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
<!-- Facebook Conversion Code for Signup success - Fans of Alumni - Website Clicks --> | |
<script>(function() { | |
var _fbq = window._fbq || (window._fbq = []); | |
if (!_fbq.loaded) { | |
var fbds = document.createElement('script'); | |
fbds.async = true; | |
fbds.src = '//connect.facebook.net/en_US/fbds.js'; | |
var s = document.getElementsByTagName('script')[0]; | |
s.parentNode.insertBefore(fbds, s); | |
_fbq.loaded = true; |
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
#Model | |
@user.should have(1).error_on(:username) # Checks whether there is an error in username | |
@user.errors[:username].should include("can't be blank") # check for the error message | |
#Rendering | |
response.should render_template(:index) | |
#Redirecting | |
response.should redirect_to(movies_path) |
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 'rails_helper' | |
RSpec.describe TodosController, :type => :controller do | |
context "GET index" do | |
#context "POST create" do | |
#context "GET show" do | |
#context "PATCH update" do (or PUT update) | |
#context "DELETE destroy" do | |
#context "GET new" do |
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
#Model | |
@user.should have(1).error_on(:username) # Checks whether there is an error in username | |
@user.errors[:username].should include("can't be blank") # check for the error message | |
#Rendering | |
page.should render_template(:index) | |
#Redirecting | |
page.should redirect_to(movies_path) |
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
# WORKSSSS! | |
bundle config build.pg --with-pg-config=/Applications/Postgres.app/Contents/Versions/9.4/bin/pg_config | |
# DOESNT INCLUDE INTO BUNDLE | |
#gem install pg -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/9.4/bin/pg_config |
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
$.ajax({ | |
type: "POST", | |
url: "https://www.sofarsounds.com/competitions/jessie-j/apply", | |
data: { _method:'POST' }, | |
success: function(msg) { | |
console.log("Request complete"); | |
} | |
}); |
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
<table border="0" cellpadding="0" cellspacing="0" width="100%"> | |
<tr> | |
<td align="center" valign="top"> | |
<table border="0" cellpadding="0" cellspacing="0" width="100%"> | |
<tr> | |
<td valign="top" style="color:#333; font-family:Arial; font-size:14px; line-height:150%; text-align:left;"> | |
<table border="0" cellpadding="10" cellspacing="0" width="100%"> | |
<tr> |
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
{% assign emails = case.emails %} | |
{% assign threadlength = emails.size|minus:1 %} | |
{% for email in emails reversed %} | |
{% if forloop.first %} | |
{{email.new_html}} | |
{% if email.agent %} | |
{% if email.agent.signature %} |
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
# This goes in user root dir, ie ~ | |
# So you can just call | |
alias deploy=./deploy.sh | |
alias deploy_ci=./deploy_ci.sh | |
alias deploy_live=./deploy_live.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
# create new project | |
phonegap create my-app | |
# requires... | |
# - android sdk | |
# - brew install ant | |
# - adding tools and platform-tools to path | |
#PATH=$PATH:$HOME/Development/adt-bundle-mac-x86_64-20140321/sdk/tools # android command | |
#PATH=$PATH:$HOME/Development/adt-bundle-mac-x86_64-20140321/sdk/platform-tools # adb command |
NewerOlder