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
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
appName:'Ember Twiddle' | |
}); |
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
{ | |
"opsworks": { | |
"activity": "deploy", | |
"sent_at": 1399533119, | |
"deployment": "33cb5d91-27c8-4e71-9d3e-e7925e5caa03", | |
"layers": { | |
"php-app": { | |
"name": "PHP App Server", | |
"id": "73271990-452b-4e5f-8a71-619e6441a447", | |
"elb-load-balancers": [ |
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
# spec/support/poltergeist_screenshot_helper.rb | |
module PoltergeistScreenshotHelper | |
# FROM http://blog.jerodsanto.net/2012/12/capybara-and-poltergeist-snap/ | |
def snap!(options={}) | |
path = options.fetch :path, "~/.Trash" | |
file = options.fetch :file, "#{Time.now.to_i}.png" | |
full = options.fetch :full, true | |
path = File.expand_path 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
# /code/railsapp/app/assets/javascripts/thing/app.js.coffee | |
#= require angular/templates | |
angular.module("thing", ["app.templates"]).value("appName", "thing") |
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
var callMethod = function(target, method, args) { | |
if (Ember.typeOf(method) === 'string') { | |
method = target[method]; | |
} | |
return method.apply(target, args); | |
}; | |
/** | |
Returns a function, that, when invoked, will only be triggered at most once during a given window of time. | |
*/ |
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
// ---------------------------------------------------------- | |
// A short snippet for detecting versions of IE in JavaScript | |
// without resorting to user-agent sniffing | |
// ---------------------------------------------------------- | |
// If you're not in IE (or IE version is less than 5) then: | |
// ie === undefined | |
// If you're in IE (>=5) then you can determine which version: | |
// ie === 7; // IE7 | |
// Thus, to detect IE: | |
// if (ie) {} |
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 OR REPLACE FUNCTION escape_json (text) RETURNS text AS $$ | |
SELECT replace($1, '''', '\'''); $$ LANGUAGE SQL IMMUTABLE; | |
CREATE OR REPLACE FUNCTION to_json(text) RETURNS text AS $$ | |
SELECT escape_json($1) $$ LANGUAGE SQL IMMUTABLE; | |
CREATE OR REPLACE FUNCTION to_json(KEY text, value text) RETURNS text AS $$ | |
SELECT '''' || to_json($1) || ''': ''' || to_json($2) || ''''; $$ LANGUAGE SQL IMMUTABLE; |
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
source "https://rubygems.org" | |
gem 'sprockets' | |
gem 'sprockets-sass' | |
gem 'sass' | |
gem 'compass' | |
gem 'bootstrap-sass' | |
gem 'handlebars_assets' | |
gem 'coffee-script' |
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 ruby | |
# This is a basic deploy script for Heroku apps. | |
# It provides a structure you can use to expand on | |
# and add your own prereqs and deploy tasks. | |
# | |
# It basically ensures that: | |
# 1. There are no uncommited files | |
# 2. You can ssh to github | |
# 3. You can connect to heroku |