This file contains hidden or 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
convert -crop 1920x1200x1920 src.jpg output.jpg |
This file contains hidden or 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
Minecraft Guide | |
############### | |
The Minecraft wiki (www.minecraftwiki.net) was the source for all of this | |
material. I wanted the info in a fixed width, 80 column, text only format, | |
but none of the recipe content itself is new or unique to this guide. | |
basics | |
=============================================================================== | |
1 wood => 4 wood planks |
This file contains hidden or 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 'benchmark' | |
RUNS = 10_000 | |
OUTER_KEYS = 10 | |
INNER_STRUCTURES = 3 | |
INNER_KEYS = 5 | |
GC::Profiler.enable |
This file contains hidden or 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
# Use the remainder of this file only with interactive shells | |
[ -z "$PS1" ] && return | |
# Enable prompt substitution and colors | |
setopt prompt_subst | |
autoload colors | |
colors | |
# Set the prompts | |
ruby_version() { |
This file contains hidden or 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
$> launchctl unload -w ~/Library/LaunchAgents/com.mysql.mysqld.plist | |
$> /usr/local/Cellar/mysql/5.5.9/bin/mysqld --basedir=/usr/local/Cellar/mysql/5.5.9 --datadir=/usr/local/Cellar/mysql/5.5.9/data --plugin-dir=/usr/local/Cellar/mysql/5.5.9/lib/plugin --log-error=/usr/local/Cellar/mysql/5.5.9/data/errors.err --pid-file=/usr/local/Cellar/mysql/5.5.9/data/pidfile.pid --skip-grant-tables | |
$> mysql | |
mysql> UPDATE mysql.user SET Password=PASSWORD('root_password') WHERE User='root'; | |
mysql> FLUSH PRIVILEGES; | |
$> kill `cat /usr/local/Cellar/mysql/5.5.9/data/pidfile.pid` |
This file contains hidden or 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 'iconv' | |
# This is a simple script to spider your Netflix paginated "What You've Rated" list. | |
# It requires an OS X based system with Ruby 1.9+, Safari, and AppleScript | |
# | |
# I could not find a way to back up my ratings (for all titles, not just my rental activity) | |
# without registering for a Netflix API key or handing my Netflix credentials over to someone | |
# who had an API key, so I decided to take a brute force approach and just parse the HTML for | |
# every page of my ratings history on Netflix's site. |
This file contains hidden or 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
free|grep /|awk '{print $3/($3+$4)*100}' |
This file contains hidden or 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
# Adapted from Dr. Watson's 5.5.8 formula | |
# https://github.com/dctrwatson/homebrew/blob/5fe26cbc27eceb0955836f9b5434c3ed6ef0de76/Library/Formula/mysql55.rb | |
require 'formula' | |
class Mysql < Formula | |
homepage 'http://dev.mysql.com/doc/refman/5.5/en/' | |
url 'http://mysql.mirrors.pair.com/Downloads/MySQL-5.5/mysql-5.5.9.tar.gz' | |
md5 '701c0c44b7f1c2300adc0dc45729f903' | |
depends_on 'readline' |
This file contains hidden or 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
logger.warn "*** BEGIN RAW REQUEST HEADERS ***" | |
self.request.env.each do |header| | |
logger.warn "HEADER KEY: #{header[0]}" | |
logger.warn "HEADER VAL: #{header[1]}" | |
end | |
logger.warn "*** END RAW REQUEST HEADERS ***" |
This file contains hidden or 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
--ignore-dir=log | |
--ignore-dir=logs | |
--ignore-dir=images | |
--ignore-dir=javascripts | |
--ignore-dir=stylesheets | |
--ignore-dir=tmp | |
--ignore-dir=vendor | |
--ignore-case | |
--smart-case |