Skip to content

Instantly share code, notes, and snippets.

Unfortunately, a fatal error has occurred. Please see the Bundler
troubleshooting documentation at http://bit.ly/bundler-issues. Thanks!
/Users/dc/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/rubygems/format.rb:62:in `from_io': private method `open' called for Gem::Package:Class (NoMethodError)
from /Users/dc/.rvm/rubies/ruby-1.9.3-p385/lib/ruby/1.9.1/rubygems/format.rb:46:in `block in from_file_by_path''`'`'`
#wm git
gitbruser() {
git branch $2 |
grep "$1" |
sed "s/^.*\\($1\\/.*\\)$/\\1/"; }
gbrdc() { gitbruser dc $1 }
gbrsdc() { gbrdc --no-merged | rgs git checkout -=-=; }
def foo(lam, bar)
lam.call
end
# hoge is japan's foobar - thanks @cwgem
bar = 'hoge'
# lambda retains the bindings from it's original declaration
el = lambda { puts bar*5 }
p = Proc.new { puts bar*5 }
# function to create a Site-Specific-Browser in OSX using Chrome
# https://gist.github.com/demonbane/1065791/raw/8d71cddae27e0f30ac7c45ea53ea1dd30ca8eb6c/makeapp.sh
create-ssb(){
echo "What should the Application be called (no spaces allowed e.g. GCal)?"
read inputline
name=$inputline
echo "What is the url (e.g. https://www.google.com/calendar/render)?"
read inputline
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = [email protected]:dcunited001/CCNx-Federated-Wiki-Prototype
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
require 'formula'
class Cjdns < Formula
homepage 'https://github.com/cjdelisle/cjdns'
head 'https://github.com/cjdelisle/cjdns.git', :branch => 'named-pipes'
def options
[
['--notest', "Skip the tests"]
]
brew install https://raw.github.com/dcunited001/homebrew/dc/ccn-keggar/Library/Formula/ccnx.rb
brew install --HEAD https://gist.github.com/dcunited001/5626800/raw/5b7fe1b04ee278d7f658ac216eff4dccf43aa218/cjdns.rb
@dcunited001
dcunited001 / git.sh
Last active December 17, 2015 19:19
Gitar, Gitlist, Gull, Gync, Gush: git functions to manage rebasing upstream changes in.
#===============
# gull
# gync
# gush
# gushforce
#
# mostly using this now
# really easy to use,
# with bash arrays for branch lists
@dcunited001
dcunited001 / func.sh
Last active December 17, 2015 19:19
#===============================
# Hub Auth
#===============================
alias hub="hub-auto-auth; hub"
hub-auto-auth() {
if [ -n $GITHUB_USER ]; then read -s GITHUB_USER; else echo "USERNAME: $GITHUB_USER"; fi
if [ -n $GITHUB_PASSWORD ]; then read -s GITHUB_PASSWORD; else echo "PASSWORD: ..."; fi; }
# -*- mode: ruby -*-
# vi: set ft=ruby :
# this works with `ruby Vagrantfile`
# but not `vagrant up`
require 'yaml'
require 'erubis'
@cfg = YAML::load(DATA)