This file contains 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
diff --git a/app/controllers/parents_controller.rb b/app/controllers/parents_controller.rb | |
index 4f6831f..ce6c226 100644 | |
--- a/app/controllers/parents_controller.rb | |
+++ b/app/controllers/parents_controller.rb | |
@@ -25,6 +25,7 @@ class ParentsController < ApplicationController | |
# GET /parents/new.json | |
def new | |
@parent = Parent.new | |
+ @parent.children.build | |
This file contains 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
diff --git a/app/controllers/parents_controller.rb b/app/controllers/parents_controller.rb | |
index 4f6831f..ce6c226 100644 | |
--- a/app/controllers/parents_controller.rb | |
+++ b/app/controllers/parents_controller.rb | |
@@ -25,6 +25,7 @@ class ParentsController < ApplicationController | |
# GET /parents/new.json | |
def new | |
@parent = Parent.new | |
+ @parent.children.build | |
This file contains 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 bash | |
ps aux | fgrep 'ruby script/rails s -d' | awk '{print $2}' | xargs kill -9 |
This file contains 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 bash | |
# filter out the noisy asset pipeline | |
tail -f ./log/development.log | egrep -v "(^$|GET|Served)" |
This file contains 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 sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
This file contains 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
# via http://stackoverflow.com/questions/3680463/mobile-redirect-using-htaccess | |
RewriteEngine on | |
RewriteBase / | |
# Check if this is the noredirect query string | |
RewriteCond %{QUERY_STRING} (^|&)m=0(&|$) | |
# Set a cookie, and skip the next rule | |
RewriteRule ^ - [CO=mredir:0:www.website.com] | |
# Check if this looks like a mobile device | |
# (You could add another [OR] to the second one and add in what you |
This file contains 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
<?php | |
function url2png_v6($url, $args) { | |
# Get your apikey from http://url2png.com/plans | |
$URL2PNG_APIKEY = "PXXXX"; | |
$URL2PNG_SECRET = "SXXXX"; | |
# urlencode request target |
This file contains 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
<?xml version="1.0" encoding="UTF-8"?> | |
<Hello>World</Hello> |
This file contains 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
require 'twilio-ruby' | |
require 'yaml' | |
account_sid = 'AC--------------------------------' | |
auth_token = '--------------------------------' | |
config = { | |
:from => '+15555555555', # your twilio verified phone number | |
:to => '+15558675309', # your phone number | |
:url => 'http://yourdomain.com/scrum/?call=18886191583&pass=555555555' # where the Twiml XML file below is hosted |
This file contains 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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |