This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Base16 Default - Console color setup script | |
# Chris Kempson (http://chriskempson.com) | |
color00="15/15/15" # Base 00 - Black | |
color01="ac/41/42" # Base 08 - Red | |
color02="90/a9/59" # Base 0B - Green | |
color03="f4/bf/75" # Base 0A - Yellow | |
color04="6a/9f/b5" # Base 0D - Blue | |
color05="aa/75/9f" # Base 0E - Magenta |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ "$#" -ne "1" ]; then | |
echo "Usage: $0 package_list" | |
exit 1 | |
fi | |
cat $1 | xargs -I {} bash -c "echo {}; brew deps {}" | sort | uniq > /tmp/brew_keep | |
comm -23 <(brew list -1 | sort) <(cat /tmp/brew_keep) > /tmp/brew_rm | |
lines=$(cat /tmp/brew_rm | wc -l | sed -e 's/ //g') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.awt.*; | |
public class Beep | |
{ | |
public static void main(String[] argv) { | |
java.awt.Toolkit.getDefaultToolkit().beep(); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module BrowserTabs | |
module AppleScriptUtils | |
class AppleScriptError < StandardError; end | |
class << self | |
def run_file(filename, *args) | |
osascript(true, *args) | |
end | |
def run(src, *args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Calculates network and broadcast based on supplied ip address and netmask | |
# Usage: broadcast_calc.sh 192.168.0.1 255.255.255.0 | |
# Usage: broadcast_calc.sh 192.168.0.1/24 | |
tonum() { | |
if [[ $1 =~ ([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+)\.([[:digit:]]+) ]]; then |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Configuration file for the color ls utility | |
# Synchronized with coreutils 8.5 dircolors | |
# This file goes in the /etc directory, and must be world readable. | |
# You can copy this file to .dir_colors in your $HOME directory to override | |
# the system defaults. | |
# COLOR needs one of these arguments: 'tty' colorizes output to ttys, but not | |
# pipes. 'all' adds color characters to all output. 'none' shuts colorization | |
# off. | |
COLOR tty |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script allows a users to open files from finder in vim inside of iTerm | |
# | |
# If vim is already running in iTerm, this script won't open the file from within | |
# vim. The script is not that smart. | |
# | |
# This script will work in three different scenarios: | |
# 1. iTerm is not running at all. In this case, when iTerm is launched, a new | |
# window is created, but only after a second. This window won't have | |
# anything running in it, so we can start vim in that window without | |
# creating a new tab first. |