Skip to content

Instantly share code, notes, and snippets.

Avatar

Christopher Roach croach

View GitHub Profile
@croach
croach / nenv.sh
Created Mar 16, 2014
A set of bash/zsh functions that provide simple virtual environment capabilities for node.
View nenv.sh
#
# A set of bash/zsh functions that provide simple virtual environment
# capabilities for node. To install, just copy this file into your home
# directory and add the following to your .bashrc or .zshrc file:
#
# if [[ -f "$HOME/.nenv" ]]; then
# source "$HOME/.nenv"
# fi
#
# What this script provides is a set of functions that are activated whenever
@croach
croach / core.clj
Created Aug 14, 2011
Scatter Plot w/ Normalized Data
View core.clj
(ns hooray-data.core
(:gen-class)
(:use (incanter core stats charts io))
(:use [incanter.processing :only (norm)]))
(def data (read-dataset
"https://raw.github.com/liebke/incanter/master/data/iris.dat"
:delim \space
:header true))
View gist:278566
#include <stdio.h>
int fib(n) {
if ((n == 0)||(n == 1)) {
return n;
} else {
return fib(n-1) + fib(n-2);
}
}
View gist:278565
def fib(n)
if n == 0 || n == 1
n
else
fib(n - 1) + fib(n - 2)
end
end
if $0 == __FILE__
36.times do |i|
View gist:267631
function fib(n)
if n <= 1 then
return n
else
return fib(n-1) + fib(n-2)
end
end
for i=0, 35 do print("n = "..i.." => "..fib(i)) end
View gist:267442
Host mygitrepo
Hostname christopherroach.com
Port 2222
User remote_username
View .gitattributes
#### `.gitattributes`
*.pbxproj -crlf -diff -merge
View .gitignore
#### `.gitignore`
# xcode noise
build/*
*.mode1v3
# SVN directories
.svn
# osx noise
.DS_Store
View gist:267215
#ifndef HEADER_H
#define HEADER_H
// Contents of the header file
#endif
View gist:267214
#import <stdio.h>
int main(int argc, char **argv) {
printf("Hello world");
}
You can’t perform that action at this time.