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
grep -Eho "&#?[a-z0-9]+;" *.html | sort | uniq |
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/local/Library/Homebrew/formula.rb:310: warning: else without rescue is useless | |
Error: /usr/local/Library/Homebrew/formula.rb:300: syntax error, unexpected kCASE, expecting kWHEN | |
case :llvm, :clang | |
^ | |
/usr/local/Library/Homebrew/formula.rb:300: syntax error, unexpected ',', expecting kWHEN | |
case :llvm, :clang | |
^ | |
/usr/local/Library/Homebrew/formula.rb:725: syntax error, unexpected kEND, expecting $end | |
Please report this bug: https://github.com/mxcl/homebrew/wiki/Checklist-before-filing-a-new-issue | |
/usr/local/Library/Homebrew/formula_installer.rb:2:in `require' |
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
auths = {} | |
count = 0 | |
open('authorizations.txt') do |file| | |
file.each do |line| | |
key = "auth#{count}" | |
auths[key] = {} | |
auths[key][:id] = (count += 1) | |
auths[key][:groups] = line.chomp | |
auths[key][:created_at] = "<%= Time.now %>".to_s + " " |
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
for f in *.ogg; do sox "$f" "${f%.ogg}.mp3"; done |
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
class Hash | |
def method_missing(method, *args, &block) | |
key = method.to_s | |
key =~ /(.+)=$/ ? store($1, args[0]) : fetch(key) | |
end | |
end | |
h = Hash.new | |
h.foo = 'bar' | |
p h.foo |
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
# Run `rake spec`, `rake spec:models`, `rake spec:controllers`, etc | |
# without running prerequisite, database tasks. Helpful for working | |
# with non-migration-aware, legacy databases. | |
if defined?(RSpec) | |
tasks = %w{ spec models controllers helpers lib mailers | |
rcov requests routing views } | |
skip_db_task = Proc.new do |task| | |
path = task.eql?('spec') ? 'spec/**' : "spec/#{task}" |
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 | |
# Stamp class | |
# Utility class to convert datetime column values from | |
# one timezone to another (e.g., local to UTC). | |
class Stamp | |
attr_accessor :query, :status | |
attr_reader :records, :duplicates | |
def initialize(columns, old_time_zone, new_time_zone, time_format = "%F %T") |
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
class S3UrlController < AuthenticatedController | |
# Retreive a list of S3 objects | |
# For a given object, get a temporary, secret URL | |
skip_filter(*_process_action_callbacks.map(&:filter)) # Turn off any before filter that... | |
before_filter :basic_authenticate # ... is not your HTTP Basic authentication | |
rescue_from Exception do |error| | |
logger.error(error) |
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
/* Portfolio - Create PDF reports of user progress | |
Author: Sean O'Donnell <sodonnell@acponline.org> | |
Revised: April 7, 2010 | |
*/ | |
//TODO: Put CSS selectors in PortfolioOptions | |
var PortfolioOptions = { | |
debug_mode: false, | |
create_document_url: '/residents/portfolio', |
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
# unvox.sh | |
# find iphone voicemails and save them locally | |
# | |
# Sean O'Donnell | |
# Mon Dec 23 14:36:42 EST 2013 | |
# | |
# requires ffmpeg, see http://www.ffmpeg.org/ | |
BASE_DIR=$(dirname $(dirname $0)) | |
INPUT_DIR="${HOME}/Library/Application Support/MobileSync/Backup" |
OlderNewer