In Ember, the application's state manager handles routing. Let's take a look at a simple example:
App.stateManager = Ember.StateManager.create({
start: Ember.State.extend({
index: Ember.State.extend({
route: "/",
#!/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 | |
# |
$ rake rails:update | |
Generating app/assets directory and content. (same as 3.1 app generator) | |
Do you want to move all public/stylesheets into app/assets/stylesheets? (recommended) [y] | |
Moving public/stylesheets into app/assets/stylesheets... | |
Existing application.css, merging content to the end of app/assets/stylesheets/application.css. |
Currently the RubyGems index is stored as a Gzip file that is a marshalled array. Whenever Bundler needs to install a gem that is not yet installed it downloads the index, gunzips it and unmarshals it. It then looks for dependencies that are described in another file that is also a gzipped and marshalled file. There are several issues that arise from this setup:
Additionally the gems themselves are currently centralized since there is nothing in the meta data that indicates where the gem should be downloaded from. However in order to allow this it is important to find ways of keeping the index from being poisoned (is this an issue in the centralized system?)
package main | |
import( | |
"fmt" | |
"reflect" | |
) | |
func main(){ | |
// iterate through the attributes of a Data Model instance | |
for name, mtype := range attributes(&Dish{}) { |
package main | |
import( | |
"github.com/paulbellamy/mango" | |
"fmt" | |
) | |
func hello(env mango.Env) (mango.Status, mango.Headers, mango.Body) { | |
env.Logger().Println("Got a", env.Request().Method, "request for", env.Request().RawURL) | |
return 200, mango.Headers{}, mango.Body("Hello World!") |
The new rake task assets:clean removes precompiled assets. [fxn]
Application and plugin generation run bundle install unless --skip-gemfile
or --skip-bundle
. [fxn]
Fixed database tasks for jdbc* adapters #jruby [Rashmi Yadav]
Template generation for jdbcpostgresql #jruby [Vishnu Atrai]
import cgi | |
import urllib, urllib2 | |
import logging | |
from django.utils import simplejson | |
class Googl(): | |
def __init__(self, api_key): | |
self.api_key = api_key | |
self.base_url = 'https://www.googleapis.com/urlshortener/v1/url?key=%s' % self.api_key |
application: oliverfoxmurals | |
version: 1 | |
runtime: python | |
api_version: 1 | |
handlers: | |
- url: / | |
static_files: static/index.html | |
upload: static/index.html | |
(* | |
SwapBetweenSpec.scpt | |
Get into the BDD groove with this Xcode user script which quickly toggles between your implementation (or header) | |
and its Cedar Spec. Bind it to your favorite shortcut key and enjoy the cycle. | |
Be sure to add this User Script to Xcode as an Applescript, not a shell script: | |
1. Paste the contents of the gist into ~/Library/Application Support/Developer/Shared/Xcode/User Scripts/SwapBetweenSpec.scpt | |
2. When adding to script in the "Edit User Scripts" window of Xcode, choose "Add Script File..." and not "New Shell Script" and then choose the file from (1) | |
3. Set Input to "No Input" |