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 fac_iter(n) { | |
var result = 1; | |
if(n > 1) { | |
while(n > 1) { | |
result *= n; | |
n--; | |
} | |
} | |
return result; | |
} |
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
#!/bin/bash | |
for (( c=1; c<=7087; c++ )) | |
do | |
wget http://coda.fm/albums/$c/torrent/download?file=$c.torrent | |
done |
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
[remote "origin"] | |
fetch = +refs/heads/*:refs/remotes/origin/* | |
url = git@github.com:user/repo.git | |
# add the following 2 lines so $ git push pushes to both master & gh-pages | |
push = +refs/heads/master:refs/heads/gh-pages | |
push = +refs/heads/master:refs/heads/master |
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
source $ZSH/oh-my-zsh.sh | |
unsetopt correct |
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
var obj = { | |
children: [ | |
{ | |
children: [ | |
{ | |
id: "item2" | |
} | |
], | |
id: "folder_test" | |
}, |
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
export HISTTIMEFORMAT="%F %T "; history |
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
#! stdtmpl | |
# proc htmlLayout(request: TRequest, content, title: string): string = | |
# result = "" | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>${title}</title> | |
<script src="https://login.persona.org/include.js"></script> | |
<script src="/js/personabuttons.js"></script> | |
<script src="/js/personawatcher.js"></script> |
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 ubuntu:12.04 | |
MAINTAINER Ryan Seys <ryan@ryanseys.com> | |
RUN echo "deb http://archive.ubuntu.com/ubuntu precise universe" >> /etc/apt/sources.list | |
RUN apt-get update # DATE: 2013/10/26 | |
RUN apt-get upgrade -y | |
RUN apt-get install -y python-software-properties python g++ make software-properties-common | |
RUN add-apt-repository ppa:chris-lea/node.js && apt-get update | |
RUN apt-get install -y nodejs | |
ADD . /src | |
RUN cd /src; npm install |
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
#!/bin/sh | |
set -e | |
echo 'Deploying...' | |
apt-get install -y nginx | |
service nginx start | |
update-rc.d nginx defaults | |
docker build -t ryanseys/hello github.com/ryanseys/node-helloworld | |
docker run -d ryanseys/hello | |
docker ps |
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
//JavaScript | |
[] || 'hello' // returns [] | |
# Python | |
[] or 'hello' # returns 'hello' |