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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' /> | |
<style> | |
body { margin:0; padding:0; } | |
#map { position:absolute; top:0; bottom:0; width:100%; } | |
.marker-properties { | |
border-collapse:collapse; | |
font-size:11px; |
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
Well aren't you being a cunt-a-saurus Rex today. |
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
{ | |
"$schema": "http://json-schema.org/draft-03/schema#", | |
"type": [ | |
{ | |
"type": "number", | |
"minimum": 0, | |
"exclusiveMinimum": true | |
}, | |
{ | |
"type": "string", |
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
defaults write NSGlobalDomain NSUseLeopardWindowValues NO | |
defaults write com.apple.Safari NSUseLeopardWindowValues YES |
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
SELECT relname, n_tup_ins - n_tup_del as rowcount | |
FROM pg_stat_all_tables | |
WHERE relname NOT LIKE 'pg_%' | |
AND relname NOT LIKE 'sql_%'; |
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 "picasa" | |
# delete all albums. | |
begin | |
client = Picasa::Client.new user_id: $USER_ID, password: $PASSWORD | |
albums = client.album.list.entries | |
albums.each do |album| |
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 | |
# using the picasa gem => https://github.com/morgoth/picasa | |
require "picasa" | |
# delete all albums for an account. | |
begin | |
client = Picasa::Client.new(:user_id => $INSERT_GOOGLE_USER_NAME_HERE, :password => $INSERT_PASSWORD_HERE) | |
client.album.list.entries.each do |album| | |
client.album.delete(album.id) |
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 Car < ActiveRecord::Base | |
belongs_to :owner | |
belongs_to :previous_owner, class_name: "Owner" | |
def owner(new_owner) | |
self.previous_owner = owner | |
super | |
end | |
end |
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
brew update | |
brew install rbenv | |
brew install ruby-build | |
gem install rbenv-rehash | |
gem install bundler | |
git clone -- [email protected]:carsomyr/rbenv-bundler ~/.rbenv/plugins/bundler |
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 'hpricot' | |
require 'ruby_parser' | |
require 'optparse' | |
class ToHaml | |
def initialize(path) | |
@path = path | |
end |