I hereby claim:
- I am notbend on github.
- I am ben_d (https://keybase.io/ben_d) on keybase.
- I have a public key ASCv8HI6qP1QyHY11uw092Tx4rdMGx2AfJB9AmG9OWK17Qo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
var Stateful = function(states, init_state) { | |
if (typeof(states) === 'number') { | |
this.states = []; | |
for (var i = 0; i < states; i++) { | |
this.states[i] = "_" + i; //prefix with _ (_0,_1,_2...) so state labels are strings | |
} | |
} else { | |
this.states = states; | |
} | |
this.state = this.states[init_state]; |
var http = require('http'); | |
var s = http.createServer(function(req, res) { | |
res.writeHead(200, { 'content-type': 'text/plain'}) | |
res.end("hello world"); | |
}); |
var Terrain = function() { | |
//TODO windows, sun, building colors | |
this.sun_x = 0.00; | |
this.sun_y = 0.00; | |
this.holes = Array(); //x,y | |
this.p1_pos = 0; //index of building | |
this.p2_pos = 7; | |
var has_p1_pos = has_p2_pos = false; | |
for (var i=0; i < 15; i++) { | |
if (i < 5 && !has_p1_pos && Math.random() > 0.6) { |
require 'thread' | |
require 'time' | |
require 'csv' | |
class FlatfileDb | |
attr_reader :active_data | |
def initialize() | |
@active_data = Array.new | |
@sem = Mutex.new | |
end |
#!/bin/bash | |
dir=$1 | |
if [ -n "${dir}" ]; then | |
echo "Creating new git instance in ${dir}" | |
mkdir "${dir}" | |
mkdir "${dir}/app" | |
mkdir "${dir}/config" | |
mkdir "${dir}/test" |
[ben@haro ~]$ sudo pacman -S mariadb | |
resolving dependencies... | |
looking for inter-conflicts... | |
Packages (3): libmariadbclient-5.5.31-1 mariadb-clients-5.5.31-1 mariadb-5.5.31-1 | |
Total Download Size: 16.51 MiB | |
Total Installed Size: 153.10 MiB | |
:: Proceed with installation? [Y/n] Y |
factorial :: (Integral a) => a -> a | |
factorial 0 = 1 | |
factorial n = n * factorial (n - 1) |