Skip to content

Instantly share code, notes, and snippets.

View nocash's full-sized avatar

Beau Dacious nocash

View GitHub Profile
git stash # Stash changes if any
git symbolic-ref HEAD refs/heads/${NEW_BRANCH} # Change head to a new, non-existing ref
git rm -rf . # Delete files from version control and working directory
rm -r . # Delete files from file system
git commit --allow-empty -m "Created new branch ${NEW_BRANCH}" # Commit changes in the new branch
# apt-get
build-essential
curl
git-core
git-svn
gitk
gnome-do
libreadline-dev
libreadline-ruby
libsqlite3-dev
@nocash
nocash / gatherer-text-dump.url
Created October 12, 2010 22:53
Magic: The Gathering card details in Yaml format
http://gatherer.wizards.com/Pages/Search/Default.aspx?output=spoiler&method=text&action=advanced&name=+%5b%5d
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00
@nocash
nocash / create_user.sql
Created January 20, 2011 16:00
mysql create user syntax that I can never remember.
CREATE USER 'monty'@'localhost' IDENTIFIED BY 'some_pass';
GRANT ALL PRIVILEGES ON *.* TO 'monty'@'localhost' WITH GRANT OPTION;
CREATE USER 'monty'@'%' IDENTIFIED BY 'some_pass';
GRANT ALL PRIVILEGES ON *.* TO 'monty'@'%' WITH GRANT OPTION;
#!/bin/bash
git submodule foreach '
git checkout master;
git fetch --all;
git --no-pager log --oneline --reverse master..origin/master;
git reset --hard origin/master
'
--------------------------------------------------------------
DoomRL (v.0.9.9.2) roguelike post-mortem character dump
--------------------------------------------------------------
John Romero, level 6 Former Human Private, baptized by a brusier brother
on level 15 of the Phobos base.
He survived 51031 turns and scored 30244 points.
He played for 1 hour, 1 minute and 39 seconds.
He didn't like it too rough.
@nocash
nocash / webaom rules.txt
Created October 6, 2011 21:55
File handling rules for AOM.
#RENAME
DO SET '%ann'
IF E(!^[\d]+) DO ADD ' - %enr'
ELSE IF X(!1) DO ADD ' - %enr'
IF I(ver) DO ADD '%ver'
IF E(!^[\d]+) DO ADD ' - %epn'
ELSE IF E(^Part \d of \d$) DO ADD ' - %epn'
DO ADD ' - %src[%res](%vid.%aud)[%grp]'
#MOVE
#!/usr/bin/env ruby
# Download a file:
# download http://fake.com/file.zip
#
# Download multiple files:
# download http://fake.com/file1.zip http://fake.com/file2.zip
#
# Download file(s) to a directory:
# download http://fake.com/file.zip /tmp/
# download http://fake.com/file1.zip http://fake.com/file2.zip .
@nocash
nocash / .powrc
Created May 15, 2013 17:52
get Pow to recognize new RVM ruby version and gemset files.
if [ -f "$rvm_path/scripts/rvm" ] && [ -f ".ruby-version" ]; then
source "$rvm_path/scripts/rvm"
if [ -f ".ruby-gemset" ]; then
rvm use `cat .ruby-version`@`cat .ruby-gemset`
else
rvm use `cat .ruby-version`
fi
fi