Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Daniel Huckstep darkhelmet

🏠
Working from home
Block or report user

Report or block darkhelmet

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@afeld
afeld / gist:5704079
Last active Jan 31, 2019
Using Rails+Bower on Heroku
View gist:5704079
@nathany
nathany / git.rake
Created Mar 30, 2011
Generate a "Compare View" in markdown, complete with Gravatars and links to GitHub commits
View git.rake
require 'digest/md5'
namespace :git do
GITHUB_COMMIT_URL = "https://github.com/path/to/your/repo/commit/" # <= set me
# Before doing a deploy, I like to check GitHub's branch list
# but I wanted to be able to save it in a Lighthouse message
COMPARE_FOR = {
'production' => 'origin/production..origin/release',
@nathany
nathany / Vagrantfile
Created Mar 7, 2011
Vagrant Fabric experiment
View Vagrantfile
Vagrant::Config.run do |config|
# Every Vagrant virtual environment requires a box to build off of.
config.vm.box = "debian_squeeze_32"
# The url from where the 'config.vm.box' box will be fetched if it
# doesn't already exist on the user's system.
config.vm.box_url = "http://mathie-vagrant-boxes.s3.amazonaws.com/debian_squeeze_32.box"
# Assign this VM to a host only network IP, allowing you to access it via the IP.
config.vm.network "33.33.33.10"
@lenary
lenary / gitconfig.ini
Created Feb 18, 2011
a special excerpt of my gitconfig
View gitconfig.ini
$ git clone github:lenary/guides.git
Cloning into guides...
remote: Counting objects: 255, done.
remote: Compressing objects: 100% (216/216), done.
remote: Total 255 (delta 111), reused 163 (delta 35)
Receiving objects: 100% (255/255), 1.49 MiB | 564 KiB/s, done.
Resolving deltas: 100% (111/111), done.
$ cd guides
$ git remote -v
@ezmobius
ezmobius / gist:807334
Created Feb 2, 2011
Run this script on a mac osx box running 10.6 and you will get a luajit with batteries included and all the good libs
View gist:807334
#!/bin/bash
# have to hand install this one sorry http://www.cmake.org/files/v2.8/cmake-2.8.3-Darwin-universal.tar.gz
if [ "$1" == "cleanup" ]; then
echo "Cleaning up old luajit install"
cd /usr/local/share
sudo rm -rf lua luajit-2.0.0-beta6
@cowboyd
cowboyd / allruby.rb
Created Jan 17, 2011
Proof of concept for making all ruby available to javascript.
View allruby.rb
require 'v8'
require 'openssl'
class Module
def [](name)
self.const_get(name)
end
end
@sstephenson
sstephenson / gist:771090
Created Jan 8, 2011
Automatic *.test host resolution in OS X
View gist:771090
$ sudo su -
# mkdir /etc/resolver
# cat > /etc/resolver/test
nameserver 127.0.0.1
port 2155
^D
^D
$ brew install dnsmasq
$ dnsmasq --port=2155 --no-resolv --address=/.test/127.0.0.1
$ ping foo.test
View server.js
var http = require('http'),
sys = require('sys'),
fs = require('fs'),
url = require('url'),
queryString = require('querystring'),
proxy = require('./htmlfiltre'),
YUI = require('yui3').YUI;
http.createServer(function(req, res) {
proxy.htmlFiltre(req, { foreignHost: 'www.instapaper.com', foreignHostPort: 80 }, function (status, buffer, request, response, loc) {
@technoweenie
technoweenie / riak.coffee
Created Jul 24, 2010
very quick riak protobuf example in node.js
View riak.coffee
sys: require 'sys'
net: require 'net'
fs: require 'fs'
Buffer: require('buffer').Buffer
Schema: require('protobuf_for_node').Schema
schema: new Schema(fs.readFileSync('riak.desc'))
types: ['RpbErrorResp', 'RpbPingReq', 'RpbPingResp', 'RpbGetClientIdReq',
'RpbGetClientIdResp', 'RpbSetClientIdReq', 'RpbSetClientIdResp',
'RpbGetServerInfoReq', 'RpbGetServerInfoResp', 'RpbGetReq', 'RpbGetResp']
@jnunemaker
jnunemaker / gist:468109
Created Jul 8, 2010 — forked from jseifer/gist:468075
rvm version and git branch/dirtyness in prompt
View gist:468109
function __git_dirty {
git diff --quiet HEAD &>/dev/null
[ $? == 1 ] && echo "!"
}
function __git_branch {
__git_ps1 "(%s)"
}
function __my_rvm_ruby_version {
You can’t perform that action at this time.