Skip to content

Instantly share code, notes, and snippets.

View ChristianBagley's full-sized avatar

Christian Bagley ChristianBagley

View GitHub Profile
@ChristianBagley
ChristianBagley / 0_reuse_code.js
Last active August 29, 2015 14:09
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@ChristianBagley
ChristianBagley / GistList!.md
Created February 16, 2015 06:38
Try GistList for iOS! http://gistlist.io/

##alt text GistList: TODO for coders alt text

@ChristianBagley
ChristianBagley / rp5.bsh
Last active August 29, 2015 14:15 — forked from monkstone/rp5.bsh
/**
* rp5.bsh by monkstone 18 December 2013
* A jedit bean shell macro, to load environment, and call
* rp5 commando menu
*
* You must edit JAVA_HOME/GEM_HOME/GEM_PATH to match your system
*
*/
setenv("JAVA_HOME", "/opt/jdk1.8.0");
setenv("GEM_HOME", "/home/tux/.gem/ruby/2.0.0");
@ChristianBagley
ChristianBagley / ejectDisk.applescript
Last active July 9, 2016 20:46
Applescript to eject all mounted volumes, except for those on exceptions list.
set exceptionsList to {"JETDRIVE"}
tell application "Finder"
set diskList to the disks
repeat with mountedDisk in diskList
if name of mountedDisk is not in exceptionsList then
eject mountedDisk
end if
end repeat
end tellset exceptionsList to {"MobileBackups", "startup disk", "home", "net"}
tell application "Finder"
export PERL5LIB="/usr/local/lib/perl5/site_perl/5.18.2"
# Short of learning how to actually configure OSX, here's a hacky way to use
# GNU manpages for programs that are GNU ones, and fallback to OSX manpages otherwise
alias man='_() { echo $1; man -M $(brew --prefix)/opt/coreutils/libexec/gnuman $1 1>/dev/null 2>&1; if [ "$?" -eq 0 ]; then man -M $(brew --prefix)/opt/coreutils/libexec/gnuman $1; else man $1; fi }; _'
@ChristianBagley
ChristianBagley / osx-for-hackers.sh
Last active August 29, 2015 14:26 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned. Also, please don't email me about this script, my poor inbox...
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'
@ChristianBagley
ChristianBagley / hack.sh
Last active August 29, 2015 14:26 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#