I hereby claim:
- I am ardell on github.
- I am ardell (https://keybase.io/ardell) on keybase.
- I have a public key ASD5TUIHqsnAm_6YxheI4M17J3LOdDdsvai_yqA58Qc5zAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
defmodule GeocodingAdapter.GoogleMaps do | |
defmodule UnparseableResponse do | |
defexception message: "Received a response from Google Maps that contained invalid json" | |
end | |
def geocode(address) do | |
fetch_response | |
|> return_empty_unless_success | |
|> parse_body |
(function(){var script=document.createElement('script');script.src = "//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js";document.getElementsByTagName('head')[0].appendChild(script);jQuery.noConflict();jQuery('p').html(function(){var t=jQuery(this).text();return t.substring(0,45)+"*"+t.substring(45,75)+"*"+t.substring(75);})})() |
// Do this to find out the font style usage on a given page | |
var styles = { 300: { 'normal': 0, 'italic': 0}, 400: { 'normal': 0, 'italic': 0}, 500: { 'normal': 0, 'italic': 0}, 700: { 'normal': 0, 'italic': 0} }; | |
jQuery('body *').each(function(i, e) { var $e = jQuery(e); var weight = $e.css('font-weight'); if (weight == 'normal') weight = 400; if (weight == 'bold') weight = 700; var style = $e.css('font-style'); styles[weight][style] += 1; }); |
define :secure_package, :name => nil do | |
ruby_block "Check dependencies" do | |
raise "Variable name cannot be nil" if params[:name] == nil | |
end | |
execute "sudo yum -d0 -e0 -y install #{params[:name]}" | |
end |
#!/bin/sh | |
# | |
# Use ipfw to throttle bandwidth. | |
# usage: | |
# ./throttle.sh # Throttle at default (60KB/s) | |
# ./throttle.sh 5 # Throttle at custom speed (5KB/s) | |
# ./throttle.sh off # Turn throttling off | |
# flush rules | |
ipfw del pipe 1 |
apache2 | |
apache2::mod_ssl | |
php | |
php::module_mysql | |
apache2::mod_php5 | |
git | |
openssl | |
mysql::server | |
cakephp | |
gt-tutorial (does: a2dissite, git init, add .gitignore, git commit) |
# I put these in my ~/.zshrc, you can put them in your .git/config if you prefer (but in a different format) | |
git config --global merge.tool opendiff | |
git config --global merge.opendiff.cmd ~/git-diff-cmd.sh | |
git config --global mergetool.prompt false | |
--- My ~/git-diff-cmd.sh (make sure you "chmod +x" it!) --- | |
#!/bin/sh | |
/usr/bin/opendiff "$2" "$5" -merge "$1" | |
--- How to use it --- |