Skip to content

Instantly share code, notes, and snippets.

View ChristianBagley's full-sized avatar

Christian Bagley ChristianBagley

View GitHub Profile
@ChristianBagley
ChristianBagley / commandlinefu
Created January 1, 2016 21:07 — forked from seungwon0/commandlinefu
Simple shell script using commandlinefu.com API
#!/bin/sh
#
# commandlinefu - Simple shell script using commandlinefu.com API
#
# All commands sorted by date:
# % commandlinefu
#
# All commands sorted by votes:
# % commandlinefu -v
#
@ChristianBagley
ChristianBagley / Untitled-1
Created December 16, 2015 20:56
gmail keyword filters for newsletters
unsubscribe OR opt - out OR "opt out"
OR "mail preferences"
OR "email preferences"
OR "manage notifications"
OR "manage your notifications"
OR "manage alerts"
OR "alert preferences"
OR "list:yahoogroups"
OR "list:googlegroups"
OR "list:listserv"

Keybase proof

I hereby claim:

  • I am christianbagley on github.
  • I am christianb (https://keybase.io/christianb) on keybase.
  • I have a public key ASADQvqk5wE6nY66_KQ2qlIznkuREEUjmFVOa1v2Gy-eSwo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am christianbagley on github.
  • I am christianb (https://keybase.io/christianb) on keybase.
  • I have a public key whose fingerprint is 727E BBB4 9122 3421 9080 6457 6B8D 62C0 FE68 16C1

To claim this, I am signing this object:

@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
#
@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'
# 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 }; _'
export PERL5LIB="/usr/local/lib/perl5/site_perl/5.18.2"
@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"