Some random notes on the pangs of ember. Will be expanding as they are uncovered.
Say you have a form that maps to a model, something like:
<form>
<fieldset>
<legend>Who are you?</legend>
[unix_http_server] | |
file=/tmp/supervisor.sock ; path to your socket file | |
[supervisord] | |
logfile=/var/log/supervisord/supervisord.log ; supervisord log file | |
logfile_maxbytes=50MB ; maximum size of logfile before rotation | |
logfile_backups=10 ; number of backed up logfiles | |
loglevel=error ; info, debug, warn, trace | |
pidfile=/var/run/supervisord.pid ; pidfile location | |
nodaemon=false ; run supervisord as a daemon |
public int add(int a, int b) | |
{ | |
return a + b; | |
} | |
public int subtract(int a, int b) | |
{ | |
return a - b; | |
} |
a[data-icon]:before, | |
span[data-icon]:before { | |
font-family: 'Icon Font Here'; | |
content: attr(data-icon); | |
} | |
/* | |
This would also work, but other web developers might | |
yell at you about "performance" which may/not matter: |
# encoding: utf-8 | |
# | |
## Stupid small pure Ruby JSON parser & generator. | |
# | |
# Copyright © 2013 Mislav Marohnić | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a copy of this | |
# software and associated documentation files (the “Software”), to deal in the Software | |
# without restriction, including without limitation the rights to use, copy, modify, | |
# merge, publish, distribute, sublicense, and/or sell copies of the Software, and to |
# Usage: redis-cli publish message hello | |
require 'sinatra' | |
require 'redis' | |
conns = [] | |
get '/' do | |
erb :index | |
end |
# Usage: redis-cli publish message.achannel hello | |
require 'sinatra' | |
require 'redis' | |
conns = Hash.new {|h, k| h[k] = [] } | |
Thread.abort_on_exception = true | |
get '/' do |
source :rubygems gem "sinatra" | |
gem "pg" gem "activerecord-postgres-hstore" | |
gem "sinatra-activerecord" |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
// window.saveAs | |
// Shims the saveAs method, using saveBlob in IE10. | |
// And for when Chrome and FireFox get round to implementing saveAs we have their vendor prefixes ready. | |
// But otherwise this creates a object URL resource and opens it on an anchor tag which contains the "download" attribute (Chrome) | |
// ... or opens it in a new tab (FireFox) | |
// @author Andrew Dodson | |
// @copyright MIT, BSD. Free to clone, modify and distribute for commercial and personal use. | |
window.saveAs || ( window.saveAs = (window.navigator.msSaveBlob ? function(b,n){ return window.navigator.msSaveBlob(b,n); } : false) || window.webkitSaveAs || window.mozSaveAs || window.msSaveAs || (function(){ |