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
// visiting localhost:8080/blah?blah=blah outputs this: | |
// { status: 404, | |
// headers: {}, | |
// body: { error: 'Could not find path: /blah?blah=blah' } } | |
var http = require('http'); | |
var director = require('director'); | |
var router = new director.http.Router(); |
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
package sqlite | |
import ( | |
"database/sql" | |
_ "github.com/mattn/go-sqlite3" | |
"testing" | |
) | |
func Test_SqliteDriver(t *testing.T) { | |
db, err := sql.Open("sqlite3", ":memory:") |
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
package main | |
import ( | |
"fmt" | |
irc "github.com/fluffle/goirc/client" | |
"github.com/janne/go-lisp/lisp" | |
"log" | |
"os" | |
"os/signal" | |
"regexp" |
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
#lang racket | |
(require 2htdp/universe) | |
(require 2htdp/image) | |
;; diagonal overlayed circles | |
(overlay/offset | |
(overlay/offset (circle 30 'solid (color 185 26 217 175)) |
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
#lang racket | |
(require 2htdp/universe) | |
(require 2htdp/image) | |
(require test-engine/racket-tests) | |
(define WIDTH 500) | |
(define HEIGHT 500) | |
(define BACKGROUND (rectangle WIDTH HEIGHT 'solid 'white)) |
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
#lang racket | |
; TODO: fix this so it actually works for more functions and graph views | |
(require 2htdp/image) | |
(require 2htdp/universe) | |
(require test-engine/racket-tests) | |
(define WIDTH 200) | |
(define HEIGHT 200) |
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
#lang racket | |
(require 2htdp/image) | |
(require test-engine/racket-tests) | |
(struct person (name year-born fav-color)) | |
(define CURRENT-YEAR 2014) | |
(define andrew (person "Andrew" 1989 (color 20 90 200 255))) | |
(define derp (person "Derp" 1901 (color 232 121 204 255))) |
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> | |
<title>Deflationary Spiral</title> | |
<style> | |
body { | |
font-family: sans-serif; | |
font-size: 1.2em; | |
} | |
#main { |
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
; WARNING: THIS IS A COPYRIGHTED IMAGE | |
(define jayfeather <picture-here>) | |
(define jayfeather-upside-down (rotate 180 jayfeather)) | |
(define (make-diamond color) (polygon (list (make-posn 0 0) | |
(make-posn -10 20) | |
(make-posn -20 0) | |
(make-posn -10 -20)) |
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 expect = require('expect.js'); | |
var model = require('./qmodel.js'); | |
describe('qmodel', function () { | |
var createPersonModel = function () { | |
function Person (props) { | |
model.extend(this, Person, props); | |
} | |
Person.fields = { |
OlderNewer