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
; /usr/local/bin/nasm -f macho 32.asm && ld -macosx_version_min 10.7.0 -o 32 32.o && ./32 | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
; The .data section is for storing and naming constants. | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
section .data | |
msg: db "Hello world!", 10 | |
.len: equ $ - msg |
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
function store { | |
echo $PWD > ~/.dirs/$1 | |
} | |
function load { | |
if [ -f ~/.dirs/$1 ] | |
then | |
cd `cat ~/.dirs/$1` | |
else | |
echo "$1 not found" |
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
from collections import namedtuple | |
from operator import itemgetter | |
import string | |
import random | |
GA_POPSIZE = 1024 #ga population size | |
GA_MAXITER = 200 #maximum iterations | |
GA_ELITRATE = 0.2 #elitism rate (varname [sic]) | |
GA_MUTATIONRATE = 0.25 |
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
//taken verbatim (exluding the first four lines ) from | |
// http://www.generation5.org/content/2003/data/gahelloworld.cpp | |
// see http://www.generation5.org/content/2003/gahelloworld.asp | |
// | |
#pragma warning(disable:4786) // disable debug warning | |
#include <iostream> // for cout etc. | |
#include <vector> // for vector class | |
#include <string> // for string class | |
#include <algorithm> // for sort algorithm |
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
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# | |
# curl -sL https://raw.github.com/gist/2284668/hack.sh | sh |