Skip to content

Instantly share code, notes, and snippets.

View dhulihan's full-sized avatar

Dave Hulihan dhulihan

View GitHub Profile
@dhulihan
dhulihan / thumbnail.png
Last active August 29, 2015 14:14
Skyrim Magical Mod
{ Put your code here }
@dhulihan
dhulihan / server.js
Created February 3, 2015 01:34
Node.js simple file server
var finalhandler = require('finalhandler')
var http = require('http')
var serveStatic = require('serve-static')
// Serve up public/ftp folder
var serve = serveStatic(__dirname, {'index': ['index.html', 'index.htm']})
// Create server
var server = http.createServer(function(req, res){
var done = finalhandler(req, res)
@dhulihan
dhulihan / login.rb
Created February 14, 2015 01:29
RSpec 3 + FactoryGirl Login Stubs
# support/login.rb
module RSpec
module Core
class ExampleGroup
def login_admin
u = FactoryGirl.create(:admin)
login_as(u)
allow_any_instance_of(ApplicationController).to receive(:check_permissions).and_return(true)
end
@dhulihan
dhulihan / README.md
Last active August 29, 2015 14:16
bl.ocks.org test
@dhulihan
dhulihan / thumbnail.png
Last active August 29, 2015 14:21
wavedrom high five
thumbnail.png
@dhulihan
dhulihan / git-today
Last active August 29, 2015 14:23
git-today: git list of commit messages made today
# osx friendly
echo "Today I `git log --format=%s --since 6am | tail -r | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/, /g'`"
@dhulihan
dhulihan / commander_example
Created October 26, 2012 01:05
Example Commander CLI Executable spec test
#!/usr/bin/env ruby
require 'rubygems'
require 'commander/import'
program :version, "0.0.1"
command :main do |c|
c.action do |args, options|
say "This is some output"
@dhulihan
dhulihan / go.sublime-build
Last active December 9, 2015 10:08
Basic Sublime Text build system for golang. Runs `go run` on your current tab by default.
{
//"name": "Go Run",
"cmd": ["/usr/local/go/bin/go", "run", "$file"],
"working_dir": "${file_path}",
"selector" : "source.go",
"env": {
//"GOPATH": "/path/to/go"
},
"variants": [
// variants available with ctrl+shift+b
@dhulihan
dhulihan / Gemfile
Last active December 16, 2015 01:49
Jekyll Compass Plugin for hooligan theme.
source :rubygems
gem "compass"
gem "sass"
gem "jekyll"
@dhulihan
dhulihan / .vimrc
Created April 4, 2016 16:31
vim: Change color scheme when using insert mode
" visual indicator for insert mode
au InsertEnter * colors dracula
au InsertLeave * colors molokai