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 fs = require('fs'); | |
var vm = require('vm'); | |
var _ = require('underscore'); | |
var src = fs.readFileSync('test.js'); | |
var code = (_.template("'use strict';(<%= src %>)(req,res)"))({src: src}); | |
var app = require('express')(); | |
app.get('/',function(req,res){ | |
var cxt = { |
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 | |
# | |
# Shell script that configures gnome-terminal to use solarized theme | |
# colors. Written for Ubuntu 11.10, untested on anything else. | |
# | |
# Solarized theme: http://ethanschoonover.com/solarized | |
# | |
# Adapted from these sources: | |
# https://gist.github.com/1280177 | |
# http://xorcode.com/guides/solarized-vim-eclipse-ubuntu/ |
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
> {-# LANGUAGE MagicHash #-} | |
> module WorkerWrapper where | |
> import Prelude hiding (replicate, abs) | |
> import GHC.Prim (Int#) | |
> import GHC.Exts (Int(I#), (==#), (-#), (*#)) | |
> import Data.Function (fix) | |
> fac :: Int -> Int | |
> fac 0 = 1 | |
> fac n = n * fac (n - 1) |
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 ruby | |
require 'rubygems' | |
require 'pit' | |
require 'scissor/echonest' | |
Scissor.echonest_api_key = Pit.get('echonest.com', :require => { | |
'api_key' => 'your Echo Nest API key' | |
})['api_key'] |
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 util = require('util'); | |
var events = require('events'); | |
var request = require('request'); //https://github.com/mikeal/request | |
var Wordnet = function(words){ | |
this.ret = []; | |
this.words = words; | |
this.url = "http://nymnym.heroku.com/word/"; | |
events.EventEmitter.call(this); | |
}; |