- Request/Reply
- Pub/Sub
- Pipleline
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
/* | |
* Normalized hide address bar for iOS & Android | |
* (c) Scott Jehl, scottjehl.com | |
* | |
* Modified by | |
* (c) Tony Schneider | |
* | |
* MIT License | |
*/ | |
(function( win ){ |
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
if [ -f `brew --prefix`/etc/bash_completion ]; then | |
. `brew --prefix`/etc/bash_completion | |
fi | |
GREEN="\033[0;32m" | |
CYAN="\033[0;36m" | |
BLUE="\033[0;34m" | |
RED="\033[0;31m" | |
RESET="\033[0m" |
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
{ | |
"app/assets/javascripts/models/*.js": { | |
"command": "jmodel", | |
"alternate": "spec/javascripts/models/%s_spec.js", | |
"template": "App.%S = DS.Model.extend" | |
}, | |
"app/assets/javascripts/controllers/*_controller.js": { | |
"command": "jcontroller", | |
"alternate": "spec/javascripts/controllers/%s_spec.js", |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Ember Starter Kit</title> | |
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/normalize/2.1.0/normalize.css"> | |
</head> | |
<body> | |
<script type="text/x-handlebars"> |
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
gem uninstall nokogiri | |
brew uninstall libxml2 | |
bundle config build.nokogiri --with-xml2-include=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk/usr/include/libxml2 | |
bundle install | |
echo "sleep at night" |
So you need to store some JSON blobs in your database. What do you do? You have plenty of options these days. You can serialize a hash into the database. You can reach for a document store like mongodb. Or, you can lean on rails 4 postgres json data type support.
If you haven't yet upgraded to rails 4, go ahead and do that now, I'll wait...
tick, tock, looks at watch
Jokes aside, it's totally worth it.
Anywho, now that we are on rails 4, let's go ahead and stuff some JSON into the database.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Ember Starter Kit</title> | |
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/normalize/2.1.0/normalize.css"> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> | |
<script src="http://builds.handlebarsjs.com.s3.amazonaws.com/handlebars-v1.2.1.js"></script> | |
<script src="http://builds.emberjs.com/tags/v1.4.0/ember.js"></script> | |
</head> |
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
module ActiveModel | |
class Serializer | |
module Associations | |
class HasMany | |
def key_with_polymorphism | |
return @name if !option(:key) && option(:polymorphic) | |
key_without_polymorphism | |
end | |
alias_method_chain :key, :polymorphism |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Ember Starter Kit</title> | |
<link rel="stylesheet" href="http://cdnjs.cloudflare.com/ajax/libs/normalize/2.1.0/normalize.css"> | |
</head> | |
<body> | |
<script type="text/x-handlebars"> |