This file contains hidden or 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
lcs_length = (x,y) -> #1 indexed arrays | |
m = x.length - 1 | |
n = y.length - 1 | |
c = [] | |
b = [] | |
for i in [0..m] | |
c[i] = [] | |
b[i] = [] | |
c[i][0] = 0 | |
for j in [1..n] |
This file contains hidden or 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
mcm = (p) -> | |
console.log "test" | |
m = [] | |
s = [] | |
n = p.length - 1 | |
$(document.body).css "height", "20000px" | |
table = ["<table id='mcm' cellpadding=0 cellspacing=0 style='border-collapse: collapse; -webkit-transform: rotate(135deg) translate(-100px, -300px); '>"] | |
for a in [1..n] | |
table.push "<tr colspan='a'>" | |
for b in [1..a] |
This file contains hidden or 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
a = t() | |
low = 0 | |
high = 0 | |
a.replace /^[\d]+\-[\d]+ hours/mig , (hours) -> | |
#console.log hours | |
hours = hours.split " " | |
hours = hours[0] | |
hours = hours.split "-" | |
low += hours[0] - 0 | |
high += hours[1] - 0 |
This file contains hidden or 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
<img src="pics/IMG_1255.jpg" width="300"><br> | |
<img src="pics/IMG_1256.jpg" width="300"><br> | |
<img src="pics/IMG_1257.jpg" width="300"><br> | |
<img src="pics/IMG_1258.jpg" width="300"><br> | |
<img src="pics/IMG_1259.jpg" width="300"><br> |
This file contains hidden or 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
public static function resize_image($image, $w, $h) { | |
$ret = imagecreatetruecolor($w, $h); | |
imagealphablending( $ret, false ); | |
imagesavealpha( $ret, true ); | |
imagecopyresampled($ret, $image, 0, 0, 0, 0, $w, $h, imagesx($image), imagesy($image)); | |
//imageantialias($ret,true); | |
return $ret; | |
} | |
public static function overlay_image($image, $overlay, $x, $y) { |
This file contains hidden or 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
public static function csv_to_array($csv) { | |
if (substr($csv,-1) != "\n" && substr($csv,-1) != "\r") { | |
$csv .= "\n"; | |
} | |
$len = strlen($csv); | |
$table = array(); | |
$cur_row = array(); | |
$cur_val = ""; | |
$state = "first item"; |
This file contains hidden or 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
person = () -> | |
name = "Fred" | |
ret = | |
getName: () -> | |
return name | |
setName: (newName) -> | |
name = newName | |
bob = person() | |
alert bob.getName() |
This file contains hidden or 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
#hook up node.js with apache so you can have an apache site on port 80 | |
# and a node.js server running on port 80 | |
# you may need to `a2enmod proxy` and `a2enmod proxy_http` | |
<VirtualHost *:80> | |
ServerName severus.the.tl | |
ProxyPass / http://127.0.0.1:86/ | |
# CustomLog /var/log/apache2/lazeroids-node-access.log combined | |
# ErrorLog /var/log/apache2/lazeroids-node-error.log | |
# NoCache * | |
<Proxy *> |
This file contains hidden or 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
#allows you to have infinite subdomains | |
<VirtualHost *:80> | |
# first do a2enmod vhost_alias | |
ServerName anything.the.tl | |
ServerAlias *.the.tl | |
UseCanonicalName Off | |
VirtualDocumentRoot /root/workspace/sites/%0 # %0 is the full domain name | |
</VirtualHost> |
This file contains hidden or 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
call pathogen#runtime_append_all_bundles() | |
filetype plugin indent on | |
set backspace=indent,eol,start | |
set tabstop=2 | |
set shiftwidth=2 | |
set expandtab | |
"colorscheme jellybeans | |
ino jj <esc> | |
cno jj <c-c> | |
vno v <esc> |