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
# user env | |
alias __git_ps1="git branch 2>/dev/null | grep '*' | sed 's/* \(.*\)/(\1) /'" | |
export PS1="\[\033[0;31m\][\t] \[\033[0;37m\]\W \[\033[0;36m\]\$(__git_ps1)\[\033[0;31m\]$ \[\033[0m\]" | |
alias ls='ls -laG' |
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
(defun add (x y) | |
(+ x y)) | |
(print (add 1 2)) |
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
# ruby implementation of https://www.smallsurething.com/implementing-the-famous-eliza-chatbot-in-python/ | |
class Eliza | |
REFLECTIONS = { | |
"am": "are", | |
"was": "were", | |
"i": "you", | |
"i'd": "you would", | |
"i've": "you have", | |
"i'll": "you will", |
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 | |
# Using AWS S3 to make sharing files with your friends as simple as can be... | |
# ... or something. | |
# | |
# Only tested on OS X. | |
# | |
# usage: n3 [put|get|list|delete|open|help] | |
[ |
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 | |
# Track your daily water intake. | |
# | |
# usage: ./water [+|-] | |
require "yaml" | |
WATER_FILE = File.expand_path("~/.water") | |
def dump(d); File.open(WATER_FILE, "w+") {|f| f.write YAML.dump(d) }; end | |
dump({}) unless File.exists?(WATER_FILE) |
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
ruby -r json -r net/http -e 'link=JSON.parse(Net::HTTP.get_response("smasha.ninja","/rando").body);exec("open #{link["web_url"]}")' |
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
h2 Step #{step} | |
.row | |
.col-md-6 | |
if previousStep | |
button.btn.btn-primary click="gotoStep previousStep" Back | |
.col-md-6 | |
if nextStep | |
button.btn.btn-primary.pull-right click="gotoStep nextStep" Next |
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
(ns shoutbox | |
(:use compojure | |
somnium.congomongo)) | |
(mongo! :db "shoutbox") | |
(defn save-shout [s] | |
(insert! :shouts | |
{:text s})) | |
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/bash | |
# drop .jar's into ~/.clojure and they will be auto-loaded into the classpath | |
java -cp $HOME/.clojure/*: jline.ConsoleRunner clojure.main $1 |