Skip to content

Commit

Permalink
Merge pull request #2 from silshack/gh-pages
Browse files Browse the repository at this point in the history
Updating fork
DanielleWingler committed Sep 4, 2013
2 parents bf164b2 + 4001b76 commit 9770d17
Showing 47 changed files with 3,237 additions and 80 deletions.
8 changes: 4 additions & 4 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -84,14 +84,14 @@ authors:
github: landongrindheim
twitter: landongrindheim
about: Landon is an MSIS student at UNC Chapel Hill. He grew up in North Dakota, but has lived in Idaho, Montana and North Carolina as well as in the Middle East. His brain operates primarily in the humanities.
aharding:
name: Alexander Harold
alexharding:
name: Alexander Harding
prof: false
gravatar:
website:
github:
github: alexharding
twitter:
about:
about: Alex is a second year MSIS student at SILS and the bottom of the totem pole in the UNC Libraries IT Systems department. He looks forward to working with everyone in this class!
lho:
name: Leslie Ho
prof: false
7 changes: 7 additions & 0 deletions _posts/2013-08-26-alex-post.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
layout: post
author: alexharding
categories: post
---

**WOW!** I made a post.
15 changes: 0 additions & 15 deletions _posts/2013-08-26-christophers-post.md

This file was deleted.

2 changes: 1 addition & 1 deletion _posts/2013-08-28-Pretty-Code.md
Original file line number Diff line number Diff line change
@@ -99,4 +99,4 @@ Here's some lovely code!
}
.videoActions .downloadVideo {
width: 50px;
}```
}
4 changes: 2 additions & 2 deletions _posts/2013-08-28-Syntax-Highlighting-example.md
Original file line number Diff line number Diff line change
@@ -4,9 +4,9 @@ author: danielle
categories: post
---

Here is some example code of Ruby: (It was found [here].(https://www.ruby-lang.org/en/))
Here is some example code of Ruby: (It was found [here](https://www.ruby-lang.org/en/))

```Ruby
```ruby
# Ruby knows what you
# mean, even if you
# want to do math on
21 changes: 21 additions & 0 deletions _posts/2013-08-28-elizabeths-post.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: Example of Syntax Highlighting.
layout: post
author: epeele
categories: post
---


Here is a code example taken from Ruby's website:

```
<h3>The Ideals of Ruby’s Creator</h3>
<p>Ruby is a language of careful balance. Its creator, <a href="http://www.rubyist.net/~matz/">Yukihiro “Matz”
Matsumoto</a>, blended parts of his favorite languages (Perl, Smalltalk,
Eiffel, Ada, and Lisp) to form a new language that balanced functional
programming with imperative programming.</p>
<p>He has often said that he is “trying to make Ruby natural, not simple,”
in a way that mirrors life.</p>
```
13 changes: 13 additions & 0 deletions _posts/2013-08-28-kyles-python-post.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
layout: post
author: kshaffer
categories: post
---

```python
def funct(x):
if x > 15:
print "Hooray, your number is greater than 15!"
else:
print "Dude, your number is 15 or lower..."
```
15 changes: 15 additions & 0 deletions _posts/2013-08-28-olivias-second-post.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
layout: post
author: odorsey
categories: post
---

Here's my second class post! And here's some random javascript code:

```javascript
function fancyAlert(arg) {
if(arg) {
$.facebox({div:'#foo'})
}
}
```
2 changes: 1 addition & 1 deletion _posts/2013-08-28-third-class.md
Original file line number Diff line number Diff line change
@@ -35,6 +35,6 @@ Wednesday Aug 28th Readings:

- [x] In-Class Exercise: Close your first pull request

- [ ] In-Class: Pair up with your merging partner.
- [x] In-Class: Pair up with your merging partner.

- [ ] In-Class: Set up VirtualBox Ubuntu. Extra credit for helping peers install outside of class. This is due by the end of the week. Post to our Google community if you're having trouble setting it up and someone will help you out.
50 changes: 50 additions & 0 deletions _posts/2013-08-29-ubuntu-first-steps-and-jekyll
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
layout: post
author: gmclendon
categories: howto
title: Post install Ubuntu tips & Jekyll setup
published: false
---

Disclaimer: this worked for me, I hope it works for you. I've only tested it in a limited fashion. Please comment if you have issues or fixes. I'm also a terrible technical writer, so feel free to tell me what I messed up.

##Virtual Box Extras
So, you have Ubuntu installed on your brand new VirtualBox and are trying to figure out what to do next.
The very first thing to do is install VirtualBox Guest utilities that let you do fun things like scroll.

There are two sets of extras and extensions to install, one provided by VirtualBox and another maintained by the community.
* Download [VirtualBox Extension Pack](http://download.virtualbox.org/virtualbox/4.2.16/Oracle_VM_VirtualBox_Extension_Pack-4.2.16-86992.vbox-extpack) double click the file and VirtualBox will mount it as a CD.
* Go to ['Devices>Install Guest Additions'](http://i.imgur.com/qOezy1M.png) in your running VirtualBox menu instance will launch an installer
* If an installer fails to launch or doesn't run to completion the following will install the additions manually
* in the terminal (ctrl+alt+t)

```bash
cd /media/$USER
cd VBOX {pres tab to complete}
sudo ./VBoxLinuxAdditions.run
```

* restart your VirtualBox
* Installing the Ubuntu VirtualBox Guest additions:
* in the terminal (ctrl+alt+t)

```bash
sudo apt-get install virtualbox-guest-utils
```


##Setting up a Jekyll instance (courtesy of [Michael Chelen](http://michaelchelen.net/articles/install-jekyll-ubuntu-12-10.html))
Ubuntu has an outdated version of Jekyll in its repositories, don't install it. It has a whole host of issues and fails to build most jekyll pages.
Instead we are going to install jekyll through ruby, this works better.

In the terminal (ctrl+alt+t):
```bash
sudo apt-get install ruby1.9.1 ruby1.9.1-dev make build-essential
sudo gem install jekyll
```

If when you try to run Jekyll you are told 'Command not found' you will need to add Ruby Gems to your $PATH (places linux looks for system wide-commands)
In the terminal:
```bash
export PATH=$PATH:/var/lib/gems/1.9.1/bin
```
50 changes: 50 additions & 0 deletions _posts/2013-08-29-ubuntu-first-steps-and-jekyll.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
layout: post
author: gmclendon
categories: howto
title: Post install Ubuntu tips & Jekyll setup
published: false
---

Disclaimer: this worked for me, I hope it works for you. I've only tested it in a limited fashion. Please comment if you have issues or fixes. I'm also a terrible technical writer, so feel free to tell me what I messed up.

##Virtual Box Extras
So, you have Ubuntu installed on your brand new VirtualBox and are trying to figure out what to do next.
The very first thing to do is install VirtualBox Guest utilities that let you do fun things like scroll.

There are two sets of extras and extensions to install, one provided by VirtualBox and another maintained by the community.
* Download [VirtualBox Extension Pack](http://download.virtualbox.org/virtualbox/4.2.16/Oracle_VM_VirtualBox_Extension_Pack-4.2.16-86992.vbox-extpack) double click the file and VirtualBox will mount it as a CD.
* Go to ['Devices>Install Guest Additions'](http://i.imgur.com/qOezy1M.png) in your running VirtualBox menu instance will launch an installer
* If an installer fails to launch or doesn't run to completion the following will install the additions manually
* in the terminal (ctrl+alt+t)

```bash
cd /media/$USER
cd VBOX {pres tab to complete}
sudo ./VBoxLinuxAdditions.run
```

* restart your VirtualBox
* Installing the Ubuntu VirtualBox Guest additions:
* in the terminal (ctrl+alt+t)

```bash
sudo apt-get install virtualbox-guest-utils
```


##Setting up a Jekyll instance (courtesy of [Michael Chelen](http://michaelchelen.net/articles/install-jekyll-ubuntu-12-10.html))
Ubuntu has an outdated version of Jekyll in its repositories, don't install it. It has a whole host of issues and fails to build most jekyll pages.
Instead we are going to install jekyll through ruby, this works better.

In the terminal (ctrl+alt+t):
```bash
sudo apt-get install ruby1.9.1 ruby1.9.1-dev make build-essential
sudo gem install jekyll
```

If when you try to run Jekyll you are told 'Command not found' you will need to add Ruby Gems to your $PATH (places linux looks for system wide-commands)
In the terminal:
```bash
export PATH=$PATH:/var/lib/gems/1.9.1/bin
```
118 changes: 118 additions & 0 deletions _posts/2013-09-01-Daves-post.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
---
title: Example for the Sept. 4th Class
layout: post
author: dpcolar
categories: post code
---

To add to the discussion for Wednesday's class, I wrote a few example lines of C and dumped the assembler code.
It is interesting to see where the compiler generated the same machine code for different instructions.

C code

```
#include <stdio.h>
main () {
int number; /* Declare an integer variable */
number = 0;
int one;
one = 1;
char c_one[2] = "01";
char single[1] = "1";
while (number < 10) {
printf("%d \n", number);
number++;
number += 1;
number = number + 1;
number = number + one;
number = atoi(c_one);
}
}
```

Assember output via: <br>
gcc -S -o example.s example.c <br>
as -aljnd example.s > example.txt

```
.file "example.c"
.section .rodata
.LC0:
.string "%d \n"
.text
.globl main
.type main, @function
main:
.LFB0:
.cfi_startproc
pushl %ebp The initial value for %ebp is usually 0.
This is so debuggers know when to end following the link chain in a backtrace.
Think of %ebp as a reference point.
For convenience, it is placed between the function arguments and local variables.
That way, you access arguments with a positive offset, and variables with a negative offset.
.cfi_def_cfa_offset 8
.cfi_offset 5, -8
movl %esp, %ebp %esp - Stack Pointer
This register is implicitly manipulated by several CPU instructions
(PUSH, POP, CALL, and RET among others), it always points to the last element
used on the stack.
.cfi_def_cfa_register 5
andl $-16, %esp
subl $32, %esp
movl $0, 24(%esp) number = 0;
movl $1, 28(%esp) one = 1;
movw $12592, 22(%esp) move one word (2 bytes) containing the characters "01"
"0" is 00110000 00000000 = 12288 (dec)
"1" is 00000001 00110000 = 304 (dec)
movb $49, 21(%esp) move one byte containing ASCII 49
jmp .L2 Jump the the marker .L2
.L3:
movl 24(%esp), %eax set up the parameters for printf
movl %eax, 4(%esp)
movl $.LC0, (%esp)
call printf
Note: compiler generates the same machine instructions
addl $1, 24(%esp) number++;
addl $1, 24(%esp) number += 1;
addl $1, 24(%esp) number = number + 1;
movl 28(%esp), %eax move 'one'
addl %eax, 24(%esp) add it to 'number'
leal 22(%esp), %eax Load effective address of 'c_one'
movl %eax, (%esp) change the stack pointer the the address of 'c_one'
call atoi convert a string to integer
iterate through the characters of the string from left to right,
updating an accumulator with the growing integer value. Initially, the accumulator is set to 0.
At each character c, you multiply the accumulator by 10, and then add to it the value of the digit c
movl %eax, 24(%esp) move the result back to 'number'
.L2:
"while (number < 10) {"
cmpl $9, 24(%esp) Compares two integers. It does this by subtracting the first operand from the second
jle .L3 jump to .L3 if number < or = 9
leave The compiler uses this instruction to free the used space by the function in the stack.
.cfi_restore 5
.cfi_def_cfa 4, 4
ret
.cfi_endproc
.LFE0:
.size main, .-main
.ident "GCC: (Ubuntu/Linaro 4.7.3-1ubuntu1) 4.7.3"
.section .note.GNU-stack,"",@progbits
```

References:<br>
http://stackoverflow.com/questions/8361942/assembly-registers-esp-and-ebp
http://download.intel.com/products/processor/manual/325462.pdf
http://www.intel.com/content/www/us/en/processors/architectures-software-developer-manuals.html
7 changes: 7 additions & 0 deletions _posts/2013-09-01-test-post.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
author: elliott
layout: post
title: If you see this, the site is back up.
---

Yep.
12 changes: 12 additions & 0 deletions _posts/2013-09-03-christophers-post.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
layout: post
author: IAMATinyCoder
categories: announcement
---

## Python Syntax Highlighting

```python
s = "Python syntax highlighting"
print s
```
Loading

0 comments on commit 9770d17

Please sign in to comment.