I hereby claim:
- I am markprovan on github.
- I am markprovan (https://keybase.io/markprovan) on keybase.
- I have a public key ASBJKRg5xBbF-Qltr_xlR1T-7h8WU2uOqLRRCgZoWAowiAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
heroku pg:backups restore `heroku pg:backups public-url --app production-app-name` DATABASE --app staging-app-name |
update : Action -> Model -> Model | |
update action model = | |
case action of | |
Toggle seatToToggle -> | |
let | |
updateSeat seatFromModel = | |
if seatFromModel.seatNo == seatToToggle.seatNo then | |
-- Not working, compiler expects `=` | |
{ seatFromModel | occupied <- not seatFromModel.occupied } | |
import Ember from 'ember'; | |
export default Ember.Controller.extend({ | |
actions: { | |
login: function() { | |
var data = {email: this.get("email"), password: this.get("password")} | |
var _this = this; | |
$.post( "http://localhost:3000/sessions/create", data, function( response ) { | |
store = _this.store // _this is undefined | |
}); |
require "json" | |
require "csv" | |
filename = ARGV[0] | |
json = JSON.parse(File.read(filename)) | |
CSV.open("#{filename.gsub('.json', '')}.csv", "w") do |csv| | |
csv << ["URL", "File Size"] | |
json["log"]["entries"].each do |r| | |
csv << [r["request"]["url"], r["response"]["content"]["size"]] |
#!/usr/bin/env bash | |
apt-get -y update | |
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline5-dev libyaml-dev | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p195.tar.bz2 | |
tar xvjf ruby-2.0.0-p195.tar.bz2 | |
cd ruby-2.0.0-p195/ | |
./configure --prefix=/usr/local | |
make | |
make install |
<table> | |
<thead><tr><th>foo</th></tr></thead> | |
<tbody> | |
{{#each item in controller}} | |
<tr><td>{{item.name}}</td></tr> | |
{{else}} | |
<tr><td>You have no documents. How about you {{#linkTo create}}create one now{{/link}}?</td></tr> | |
{{/each}} | |
</tbody> | |
</table> |
{{#each item in controller}} | |
{{item.name}} | |
{{else}} | |
There are no items! | |
{{/each}} |
,lass User < ActiveRecord::Bas, | |
attr_accessible :email, :invite_accepted, :password_hash, :password_salt, :invite_token, :role, :account_id, :created_at, :forename, :surname, :job_title, :department, :standard_rate, :invite_status | |
attr_accessor :password | |
before_save :encrypt_password, :assign_invite_token | |
validates_confirmation_of :password | |
validates_presence_of :password, :on => :create | |
validates_presence_of :email | |
validates_presence_of :account | |
validates_uniqueness_of :email |
filetype off | |
filetype plugin indent on | |
set rtp+=~/.vim/bundle/vundle/ | |
call vundle#rc() | |
Bundle 'gmarik/vundle' | |
Bundle 'mattn/webapi-vim' | |
Bundle 'mattn/gist-vim' | |
Bundle 'vim-ruby/vim-ruby' |