I have a state machine for the major sections of the page:
App.States = Ember.StateManger.create({
foo: Ember.State.create({})
});
I have a view that needs to reset itself whenever the user enters the foo
state:
// Document Model | |
dc.model.Document = Backbone.Model.extend({ | |
constructor : function(attrs, options) { | |
attrs.selected = false; | |
attrs.selectable = true; | |
if (attrs.annotation_count == null) attrs.annotation_count = 0; | |
Backbone.Model.call(this, attrs, options); | |
var id = this.id; |
// Main controller for the journalist workspace. Orchestrates subviews. | |
dc.controllers.Workspace = Backbone.Controller.extend({ | |
routes : { | |
'help/:page': 'help', | |
'help': 'help' | |
}, | |
// Initializes the workspace, binding it to <body>. | |
initialize : function() { |
$ rvm install jruby | |
$ rvm --create jruby@torquebox | |
$ gem install bundler | |
$ gem install torquebox-server --pre --source http://torquebox.org/2x/builds/LATEST/gem-repo/ | |
$ gem install rails | |
$ rails new myapp -m $(torquebox env TORQUEBOX_HOME)/share/rails/template.rb | |
$ cd myapp | |
$ torquebox deploy | |
$ torquebox run |
Upgrading to homebrew postgresql 9.1.1 from 9.0.x | |
* Copy the old data | |
mv -R /usr/local/var/postgres/ /usr/local/var/postgres-901 | |
* Create a new database using 9.1.1 | |
/usr/local/Cellar/postgresql/9.1.1/bin/initdb /usr/local/var/postgres |
I have a state machine for the major sections of the page:
App.States = Ember.StateManger.create({
foo: Ember.State.create({})
});
I have a view that needs to reset itself whenever the user enters the foo
state:
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>D3 - Line Chart - axes and grid using axis()</title> | |
<!-- script type="text/javascript" src="https://raw.github.com/jquery/sizzle/master/sizzle.js"></script --> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.min.js"></script> | |
<script type="text/javascript" src="http://mbostock.github.com/d3/d3.time.min.js"></script> | |
<style type="text/css"> | |
body { |
input { | |
stdin { | |
type => rails | |
} | |
} | |
filter { | |
grok { | |
type => "rails" | |
pattern => "Completed %{GREEDYDATA:operation} in %{NUMBER:time:int}ms" |
require 'bundler/setup' | |
require 'sass' | |
require 'compass' | |
require 'rake-pipeline' | |
require 'listen' | |
require 'rack/lock' | |
require 'ruby-debug' | |
require 'securerandom' | |
STDOUT.sync = true |
#Knife invocations supply FQDN as the node name at creation time and this becomes hostname( option -N) | |
execute "Configure Hostname" do | |
command "hostname --file /etc/hostname" | |
action :nothing | |
end | |
#Ensure the hostname of the system is set to knife provided node name | |
file "/etc/hostname" do | |
content node.name |
Ember.HandlebarsTransformView = Ember.View.extend(Ember._Metamorph, { | |
rawValue: null, | |
transformFunc: null, | |
value: function(){ | |
var rawValue = this.get('rawValue'), | |
transformFunc = this.get('transformFunc'); | |
return transformFunc(rawValue); | |
}.property('rawValue', 'transformFunc').cacheable(), |