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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<!-- Generated by: TmTheme-Editor --> | |
<!-- ============================================ --> | |
<!-- app: http://tmtheme-editor.herokuapp.com --> | |
<!-- code: https://github.com/aziz/tmTheme-Editor --> | |
<plist version="1.0"> | |
<dict> | |
<key>name</key> | |
<string>Algae</string> |
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
import scala.io.Source | |
import scala.util.matching.Regex | |
import scala.collection._ | |
object Spreadsheet extends App { | |
val RefFormat = new Regex("([a-z]+)([1-9]+)", "row", "col") | |
val LineFormat = new Regex("^([a-z]+)([1-9]+):(.*)", "row", "col", "expr") | |
val ExprInt = new Regex("(-?\\d+)", "v") | |
val ExprFloat = new Regex("(-?\\d+\\.\\d+)", "v") |
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
import scala.collection.mutable.Map | |
object Worder { | |
val Dict = List("a", "pot", "toe", "potatoe", "to") | |
// used for memoization in isParsable() | |
val memo = Map.empty[String, Boolean] | |
def main(args: Array[String]) { | |
printParseTree(new ParseTreeNode("", parse("apotatoe"))) |
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
CK.Model.init(config.drowsy.url, DATABASE).done(function () { | |
CK.Model.initWakefulCollections(config.wakeful.url).done(function() { | |
// do your stuff here | |
}); | |
}); |
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
model.User = model.db.Document('users').extend({ | |
setPhaseData: function(phaseKey, value) { | |
var pd = this.get('phase_data'); | |
pd[phaseKey] = fooBar; | |
this.set('phase_data', pd); | |
} | |
}); |
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
// npm install git://github.com/zuk/Backbone.Drowsy.git | |
// ... or just put the git URL in in package.json's dependencies | |
var jQuery = require('jquery'); | |
var _ = require('underscore'); | |
var Backbone = require('backbone'); | |
Backbone.$ = jQuery; | |
var Drowsy = require('backbone.drowsy').Drowsy; |
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
def initialize | |
@students = {} | |
end | |
someone_joined_room do |stanza| | |
stu = lookup_student(Util.extract_login(stanza.from), true) unless stanza.from == agent_jid_in_room | |
if stu | |
log "#{stu} joined #{config[:room]}" |
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
#include <stdio.h> | |
#define SERIAL_BAUDRATE 9600 | |
#define MILLISECONDS_PER_FRAME 30 | |
// the pins that control the brightness of RED, GREEN, and BLUE LEDs respectively | |
#define R 9 | |
#define G 10 | |
#define B 11 |
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
#include <stdio.h> | |
#define SERIAL_BAUDRATE 9600 | |
#define MILLISECONDS_PER_FRAME 30 | |
// the pins that control the brightness of RED, GREEN, and BLUE LEDs respectively | |
#define R 9 | |
#define G 10 | |
#define B 11 |
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
#include <stdio.h> | |
char cmd; | |
#define CMD_ROCK 'r' | |
#define CMD_PAPER 'p' | |
#define CMD_SCISSORS 's' | |
void setup() { | |
Serial.begin(9600); |