Skip to content

Instantly share code, notes, and snippets.

View coderdan's full-sized avatar

Dan Draper coderdan

View GitHub Profile
defprotocol Foo do
def example()
end
defimpl Foo, for: [List, MyType] do
def example do
"Example"
end
end
Verifying my Blockstack ID is secured with the address 1EHxKJHoX7XQMBRxvAjUNQxbxF7fZRNwUX https://explorer.blockstack.org/address/1EHxKJHoX7XQMBRxvAjUNQxbxF7fZRNwUX
def site_path(site)
val = if site.respond_to?(:to_param)
site.to_param
else
site
end
"/sites/#{val}"
end
Meggings you probably haven't heard of them swag, gastropub green juice keytar art party echo park locavore jean shorts. Gentrify brunch bespoke portland normcore listicle. Offal umami freegan bushwick listicle. Ethical art party cardigan health goth, master cleanse cronut listicle tote bag tumblr wayfarers biodiesel beard deep v iPhone hoodie. Austin seitan 3 wolf moon flannel, cold-pressed etsy fap. Slow-carb gastropub tumblr, plaid you probably haven't heard of them yuccie trust fund paleo gentrify kinfolk. Mustache narwhal listicle, viral plaid drinking vinegar franzen flexitarian tofu biodiesel bushwick flannel.
Fingerstache etsy franzen, shabby chic crucifix roof party gluten-free marfa mustache flexitarian viral gentrify locavore paleo +1. Paleo XOXO forage dreamcatcher, disrupt keffiyeh organic roof party chicharrones YOLO sartorial. Bespoke kinfolk williamsburg, asymmetrical pinterest four dollar toast kogi farm-to-table try-hard bicycle rights 8-bit tote bag. Chillwave jean shorts sriracha knausgaa
This past week I listened to a fantastic interview with Annabel Crabb by Wil Anderson on his podcast "Wilosophy". Annabel discusses that while Women are increasingly staying in the workforce after having children, the movement of men to home duties is virtually non-existent.
In fact, according to Annabel, the problem begins with language. The terms Working Mum (Mom) and Stay at Home Dad have become commonplace but when we use them they load our statements with a hidden expectation. Working Mum implies that the term Mum doesn't come along with the word working. Similarly, Stay at Home Dad implies that men don't typically stay at home to take charge of family duties.
Undoubtedly, there is much work to do to support more women in the workforce after the birth of a child. However, one of the big blockers to keeping mothers in the workplace, is the startlingly low number of dads choosing to take time off work to look after the family. According to Pew research only around 3% of fathers choose not to work full ti
require 'rspec'
NUMBERS = {
1 => 'one',
2 => 'two',
3 => 'three',
4 => 'four',
5 => 'five',
6 => 'six',
7 => 'seven',
Started POST "/events" for 59.167.130.80 at 2015-06-29 04:45:23 +0000
Processing by EventsController#create as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"1I+XIaiEAOacU+eoAVz5BU/1LILv7lDBDCQahCWMPUe5PCxRu2NFNfDT68tPhxM3yCtYNKWT0byB96Am+LDLZQ==", "event"=>{"event_name"=>"Simple 1", "start_time(1i)"=>"2015", "start_time(2i)"=>"6", "start_time(3i)"=>"30", "time_slot_ids"=>["1", "2", ""]}, "commit"=>"Create my event"}
User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]]
Unpermitted parameter: time_slot_ids
(0.1ms) begin transaction
SQL (0.4ms) INSERT INTO "events" ("event_name", "start_time", "user_id", "created_at", "updated_at") VALUES (?, ?, ?, ?, ?) [["event_name", "Simple 1"], ["start_time", "2015-06-30 00:00:00.000000"], ["user_id", 1], ["created_at", "2015-06-29 04:45:23.392162"], ["updated_at", "2015-06-29 04:45:23.392162"]]
(8.3ms) commit transaction
Redirected to https://togs-twitter2-tmehta2442.c9.io/events/41
Completed 302 Found in 16m
puts "Hello World"
def create
@form = ReminderForm.new(remindable.reminders.build)
if @form.validate(reminder_params)
@form.save do |params|
ReminderCreator.new(current_user, remindable, params).perform
redirect_to :back, notice: "Reminder '#{@form.title}' created successfully."
end
else
render :new
end
@coderdan
coderdan / rails-template.rb
Last active August 29, 2015 14:07
JobReady Service Application Template
# TODO: Bower initializer, dotenv at top, oauth/doorkeeper stuff
add_source 'https://nQPUkxkYvJdhiX87ansa@gem.fury.io/jobready/'
gem 'dotenv-rails'
multi = yes?('Does this app need multitenancy?')
sidekiq = yes?('Does this app need background processing with sidekiq?')
api_access = yes?('Is API access needed?')