-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from silshack/gh-pages
Updating fork
Showing
47 changed files
with
3,237 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -99,4 +99,4 @@ Here's some lovely code! | |
} | ||
.videoActions .downloadVideo { | ||
width: 50px; | ||
}``` | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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..." | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'}) | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
``` |
Oops, something went wrong.