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
module GameOfLife | |
def self.play input, n | |
# return 42 if input == "the universe and everything" | |
@board = make_board_from input | |
n.times { age!; print_board; sleep(0.2) } | |
end | |
def self.age! | |
results = parse_cells | |
process results |
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 python | |
"""http://stevelosh.com/projects/t/#installing-t | http://bitbucket.org/sjl/t/""" | |
"""t is for people that want do things, not organize their tasks.""" | |
from __future__ import with_statement | |
import os, re, sys, hashlib | |
from operator import itemgetter | |
from optparse import OptionParser, OptionGroup |
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
//foreground color | |
public static final String BLACK_TEXT() { return "\033[30m";} | |
public static final String RED_TEXT() { return "\033[31m";} | |
public static final String GREEN_TEXT() { return "\033[32m";} | |
public static final String BROWN_TEXT() { return "\033[33m";} | |
public static final String BLUE_TEXT() { return "\033[34m";} | |
public static final String MAGENTA_TEXT() { return "\033[35m";} | |
public static final String CYAN_TEXT() { return "\033[36m";} | |
public static final String GRAY_TEXT() { return "\033[37m";} |
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
/* Here is your chance to take over Socrates! | |
Spend 10 minutes on each of the following hacks to the socrates website. | |
Enter them in the console to make sure it works and then save | |
your results here. | |
Choose a new pair for each. Add your names to the section you complete. | |
*/ |
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
<!doctype html> | |
<html> | |
<head> | |
<link rel="stylesheet" href="http://cdn.jsdelivr.net/normalize/2.1.0/normalize.css"> | |
<link rel="stylesheet" href="main.css"> | |
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800"> | |
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Lato:100,900"> | |
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css"> | |
</head> |
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
//------------------------------------------------------------------------------------------------------------------ | |
// YOUR CODE: Create your Zoo "object literal" and Animal "constructor" and "prototypes" here. | |
//------------------------------------------------------------------------------------------------------------------ | |
var Zoo = { | |
animals: {}, | |
init: function(animalInput) { | |
for(index in animals) { | |
this.animals[animalInput[index].name] = animalInput[index].legs; | |
}; |
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
<snippet> | |
<content><![CDATA[ | |
<form action="/${1:url}" method="post"> | |
<input type="${2:text}" name="$3"> | |
<input type="${4:password}" name="$5"> | |
${6:<input type="submit" value="Submit">} | |
</form>$0 | |
]]></content> | |
<tabTrigger>frmzplz</tabTrigger> | |
<scope>text.html - ruby</scope> |
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 boot | |
(set-env! :dependencies '[[compojure "1.5.0"] | |
[http-kit "2.1.8"]]) | |
(require '[compojure.core :refer [defroutes GET]]) | |
(require '[org.httpkit.server :refer [run-server]]) | |
(defroutes routes | |
(GET "/" [] "Hello World!")) |
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 boot | |
(set-env! :dependencies '[[compojure "1.5.0"] | |
[http-kit "2.1.8"]]) | |
;; You can pass as many packages as you want to require, | |
;; so no need to invoke it twice! | |
(require '[compojure.core :refer [defroutes GET POST]] | |
'[org.httpkit.server :refer [run-server]]) | |
(defn greet [greetee] |
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
wt cron schedule --name cat-facts \ | |
--param to=<ENEMY_PHONE_NUMBER> \ | |
--secret SID=<TWILIO_SID> \ | |
--secret TOKEN=<TWILIO_TOKEN> \ | |
--secret NUMBER=<TWILIO_NUMBER> \ | |
"<CRON SCHEDULE>" \ | |
<PATH_TO_FILE> |
OlderNewer