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 | |
# Monitors your workstation's network, then reports anytime a GA event is tracked | |
# on any web page | |
# You must install ngrep to use. On OSX: sudo port install ngrep | |
# Change 'en0' to the device you want to to monitor ('en0' is the first ethernet card). | |
# Use 'ifconfig' to see what devices you have |
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
#!/usr/bin/env ruby | |
# To use, put this in your bashrc: | |
# complete -C path/to/script -o default your_command_or_commands_here | |
# example, to complete the foo and bar commands with the foo.rb script: complete -C ~/bin/foo.rb -o default foo bar | |
prefix = ARGV[1] | |
words = `some command here, or just any array`.split.uniq | |
words = words.select {|w| /^#{Regexp.escape prefix}/ =~ w} if prefix |
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
#!/usr/bin/env ruby | |
require 'fileutils' | |
require 'net/http' | |
URL = 'http://localhost:3000' | |
OUT_DIR = 'static_output' | |
SSH_PORT = 2222 | |
SSH_URL = '[email protected]_server.com:/your_folder/on_server/' |
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 | |
echo -e "\033[0mCOLOR_NC (No color)" | |
echo -e "\033[1;37mCOLOR_WHITE\t\033[0;30mCOLOR_BLACK" | |
echo -e "\033[0;34mCOLOR_BLUE\t\033[1;34mCOLOR_LIGHT_BLUE" | |
echo -e "\033[0;32mCOLOR_GREEN\t\033[1;32mCOLOR_LIGHT_GREEN" | |
echo -e "\033[0;36mCOLOR_CYAN\t\033[1;36mCOLOR_LIGHT_CYAN" | |
echo -e "\033[0;31mCOLOR_RED\t\033[1;31mCOLOR_LIGHT_RED" | |
echo -e "\033[0;35mCOLOR_PURPLE\t\033[1;35mCOLOR_LIGHT_PURPLE" | |
echo -e "\033[0;33mCOLOR_YELLOW\t\033[1;33mCOLOR_LIGHT_YELLOW" |
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
body { color: #666663; background-color: #3e3e3e; font-size: 16px; } | |
h1, h2, h3, h4 { margin-bottom: 10px; font-weight: bold; } | |
h1 { font-size: 28px; font-weight: bold; margin-bottom: 15px; } | |
h2 { font-size: 20px; } | |
h3 { font-size: 18px; margin-bottom: 5px; } | |
h4 { } | |
ol { list-style-position: inside; list-style-type: decimal; margin-bottom: 10px; } | |
ul { list-style-position: inside; list-style-type: none; margin-bottom: 10px; } | |
li { padding: 0; margin: 0; } |
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
# Spin | |
# | |
# Install: | |
# > gem install spin | |
# > gem install kicker -s http://gemcutter.org | |
# | |
# You need 2 processes going, to run: | |
# > spin | |
# > spin_kicker | |
# |
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
>> class Foo | |
>> def bar | |
>> puts 'in bar' | |
>> end | |
>> end | |
=> nil | |
>> class Foo2 < Foo | |
>> def bar | |
>> super | |
>> puts 'in bar in foo2' |
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
require 'formula' | |
class Libstemmer < Formula | |
# upstream is constantly changing the tarball, | |
# so doing checksum verification here would require | |
# constant, rapid updates to this formula. | |
head 'http://snowball.tartarus.org/dist/libstemmer_c.tgz' | |
homepage 'http://snowball.tartarus.org/' | |
end |
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
#!/usr/bin/env ruby -wKU | |
# | |
require 'rexml/document' | |
xml = `curl -s "http://www.google.com/ig/api?weather=94123"` | |
doc = REXML::Document.new(xml) | |
condition = doc.root.elements["weather/current_conditions/condition"].attributes['data'] | |
wind_condition = doc.root.elements["weather/current_conditions/wind_condition"].attributes['data'] | |
wind_condition = wind_condition.match(/\d+/).to_s | |
temp_f = doc.root.elements["weather/current_conditions/temp_f"].attributes['data'] |
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 | |
mongod -vvvv --profile=2 --logpath /usr/local/var/log/mongodb/mongod.log -f /usr/local/etc/mongod.conf --fork | |
echo 'mongodb started' |
OlderNewer