I hereby claim:
- I am bloudermilk on github.
- I am bloudermilk (https://keybase.io/bloudermilk) on keybase.
- I have a public key whose fingerprint is B54D E33B 3320 0EA7 A7AA 6852 AB19 6B5D 5009 CE58
To claim this, I am signing this object:
# | |
# Starting | |
# | |
# Start a new feature branch | |
git checkout -b my_feature | |
# Make changes | |
# Add/Commit |
require "csv" | |
require "net/http" | |
require "json" | |
require "pry" | |
class String | |
def super_strip | |
gsub(/(^\W+|\W+$)/, "") | |
end | |
end |
I hereby claim:
To claim this, I am signing this object:
require "net/http" | |
class GravatarGenerator | |
URL_FORMAT = "http://www.gravatar.com/avatar/%s" | |
LAST_MODIFIED_TEST_STRING = "Wed, 11 Jan 1984 08:00:00 GMT" | |
def self.test(email) | |
url = URI(URL_FORMAT % generate(email)) | |
Net::HTTP.start(url.host, url.port) do |http| |
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Label</key> | |
<string>com.bloudermilk.reddit_image_downloader</string> | |
<key>ProgramArguments</key> | |
<array> | |
<string>/Users/bloudermilk/.rbenv/versions/1.9.3-p327-perf/bin/ruby</string> | |
<string>/Users/bloudermilk/.rbenv/versions/1.9.3-p327-perf/bin/reddit_image_downloader</string> |
RSpec.configure do |config| | |
config.before(:suite) do | |
DatabaseCleaner.strategy = :transaction | |
DatabaseCleaner.clean_with(:truncation) | |
end | |
config.before(:each) do | |
DatabaseCleaner.start | |
end |
// Automatically instantiates views based on the `role` attribute. | |
// | |
// Example: | |
// AA.Views.Workflow = Backbone.View.extend(); | |
// AA.Views.Workflow.bindRole("workflow"); | |
Backbone.View.bindRole = function (role) { | |
var view = this; | |
$(function () { | |
$("@" + role).each(function () { |
N.B. Things that are starred with * are local variable
rails new amit_test_blog
module ChronicAttribute | |
extend ActiveSupport::Concern | |
module ClassMethods | |
def chronic(*attrs) | |
attrs.each do |attr| | |
define_method "#{attr}=" do |value| | |
if value.is_a? String | |
with_utc do | |
self[attr] = Chronic.parse(value) |