Skip to content

Instantly share code, notes, and snippets.

View seanhess's full-sized avatar

Sean Hess seanhess

View GitHub Profile
@seanhess
seanhess / history.json
Created October 20, 2014 15:06
history
[
{
"date": "2014-10-20T14:54:20.263Z",
"diff": {
"department": "AAA",
"learningUnits": 5,
"name": "Big Bad Course",
"number": "109"
},
"version": 0
(ns svg.core
(:require [goog.dom :as dom]))
(enable-console-print!)
(println "Hello world!")
(defn main []
(let [root-view (dom/getElement "root")]
(.log js/console root-view)
macro export {
rule { var $x } => {var $x = exports.$x}
rule { function $x } => {exports.$x = function $x}
}
export export
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE ScopedTypeVariables #-}
import qualified Web.Scotty
import Web.Scotty.Trans
import Data.Text.Lazy
import Courses.Course
import Courses.Connection
import Control.Monad.IO.Class (liftIO)
import _ = require('lodash')
export interface ModalConfig {
modalUrl:string;
state:string;
}
export interface Modal {
modalUrl: string;
state: string;
@seanhess
seanhess / fib.hs
Created June 3, 2014 14:22
Fib Haskell
fib 0 = 0
fib 1 = 1
fib n = fib (n-1) + fib (n-2)
@seanhess
seanhess / hintprint.conf
Created May 6, 2014 21:51
Example API upstart script
description 'Hint of Print API'
start on runlevel [2345]
stop on runlevel [06]
limit nofile 10000 15000
respawn
respawn limit 5 5
env NODE_ENV=production
env PORT=80
chdir /root/hintprint
exec /usr/bin/node server/api.js >> /var/log/hintprint-api.log 2>&1
@seanhess
seanhess / Makefile
Created April 11, 2014 23:17
Deploy Stuff
install:
npm install
upload:
# sync all the files
rsync -rav -e ssh --delete --exclude-from config/exclude.txt . [email protected]:~/spoticka
deploy: upload
# run the remote commands
ssh -t [email protected] "cd ~/spoticka && bash config/deploy.sh"
@seanhess
seanhess / httpexample.js
Last active December 30, 2015 22:39
HTTP and Express Example
// var http = require('http');
// http.createServer(function(req, res) {
// // console.log("REQUEST", req)
// var body = ""
// req.on('data', function(data) {
// body = body + data.toString()
// })
// req.on('end', function() {
// console.log("COMPLETE", JSON.parse(body))
@seanhess
seanhess / spark_sumo_controller.js
Created December 7, 2013 18:56
required jquery
console.log("HI")
// while pressed,
var KEY_UP = 38
var KEY_DOWN = 40
var KEY_RIGHT = 39
var KEY_LEFT = 37
var STOP = 0;