Skip to content

Instantly share code, notes, and snippets.

View ColinTheRobot's full-sized avatar

Colin Hart ColinTheRobot

View GitHub Profile
@ColinTheRobot
ColinTheRobot / file1.txt
Created March 18, 2014 01:07
Created via API
Demo
@ColinTheRobot
ColinTheRobot / file1.txt
Created March 18, 2014 01:09
Created via API
Demo
@ColinTheRobot
ColinTheRobot / file1.txt
Created March 18, 2014 01:10
Created via API
Demo
@ColinTheRobot
ColinTheRobot / file1.txt
Created March 18, 2014 02:37
Created via API
Demo
@ColinTheRobot
ColinTheRobot / sinatra_calc.rb
Created March 19, 2014 14:21
sinatra_calc(not working still)
require 'sinatra'
require 'sinatra/reloader' if development?
require 'pry'
get "/" do
"Welcome to this wicked CAL-cu-LAY-torrrr....\n\n"
end
# def shove_it(shove_it)
# @array = Array.new
@ColinTheRobot
ColinTheRobot / layout.erb
Created March 20, 2014 13:07
html body templaye
<html>
<head>
<meta charset='utf-8'>
<title></title>
</head>
<body>
</body>
</html>
@ColinTheRobot
ColinTheRobot / gist:3e54b6a0cba84fa22812
Created December 11, 2014 14:55
fuzzy-ish search algorithm on model.
# This algorithm is incomplete
# It is a fuzzy search for first_name, last_name, and user_name
def self.search(params)
params.downcase!
query = params.split
results = []
# DNSMasq
brew install dnsmasq
# follow onscreen instructions for dnsmasq config. path below may have changed
# cp /usr/local/Cellar/dnsmasq/2.63/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf
# (MAY NOT BE NECESSARY)
# dnsmasq needs to run as root, so it needs to be installed into LaunchDaemons
# sudo cp /usr/local/Cellar/dnsmasq/2.63/homebrew.mxcl.dnsmasq.plist /Library/LaunchDaemons/
# edit the conf. Replace "subl" with your editor call
eval "$(rbenv init -)"
export PATH="$HOME/.rbenv/bin:$PATH"
source ~/.git-prompt.sh
GIT_PS1_SHOWDIRTYSTATE=true
GIT_PS1_SHOWUNTRACKEDFILES=true
GIT_PS1_SHOWCOLORHINTS=true
export PS1='\u:\W$(__git_ps1 " (%s)")\$ '