This file contains hidden or 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
apply_event :transfer_sent, :target_account_uid => target, | |
:amount => amount, | |
:new_balance => new_balance.amount, | |
:account_uid => uid |
This file contains hidden or 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
group :production do | |
gem 'unicorn' | |
# Enable gzip compression on heroku, but don't compress images. | |
gem 'heroku-deflater' | |
# Heroku injects it if it's not in there already | |
gem 'rails_12factor' | |
end |
This file contains hidden or 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
Date: Thu, 3 Oct 2013 17:16:51 -0700 | |
From: Gary Bernhardt <[email protected]> | |
To: [email protected] | |
Subject: Mailing practices | |
I suspect that you guys know this, but just in case: your emailing | |
practices have been resulting in... less than good impressions among the | |
people you aim to recruit. Here are some tweets, none of which were | |
written by me: |
This file contains hidden or 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
/** | |
* ReactJS: JavaScript like you've always done it. | |
* | |
* This example renders your top ten most followed friends/followers, `filter`ing | |
* only your favorites, and putting a star on all verified accounts. | |
* | |
* With ReactJS, any time your data changes, the UI is always brought up to date | |
* automatically. If friends length changes, or followCount - it always shows what | |
* `render` describes. | |
*/ |
This file contains hidden or 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
cd /tmp | |
wget ftp://ftp.vim.org/pub/vim/unstable/unix/vim-7.4a.tar.bz2 -O- | tar -xj | |
cd vim74a | |
sudo mkdir -p /opt/vim | |
sudo chown $USER /opt/vim | |
PATH=/usr/bin:/usr/sbin:/bin:/sbin ./configure --prefix=/opt/vim --enable-rubyinterp | grep ruby | |
make && make install |
- cucumber-rails
- simple_form - has a 3.0.0.rc but it depends on rails 4.0.0.rc1
- delayed_job_active_record - has a v4.0.0.beta3 so likely ready to release soon
- spork-rails - has no indication of even a beta for rails 4
- authlogic: binarylogic/authlogic#368
- activeadmin/activeadmin#1963
This file contains hidden or 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
require 'fiddle' | |
module IAmAHorriblePerson | |
def unset flag | |
value = _wrap self | |
flags = 8.times.map { |i| value[i] }.pack('C8').unpack('Q').first | |
[flags & ~flag].pack('Q').unpack('C8').each_with_index { |n,i|value[i] = n } | |
end | |
def class= k |
Sometimes you want to have a subdirectory on the master
branch be the root directory of a repository’s gh-pages
branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master
branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist
.
Remove the dist
directory from the project’s .gitignore
file (it’s ignored by default by Yeoman).
its
isn't core to RSpec. One the of the focuses of RSpec is on the documentation aspects of tests. Unfortunately, its
often leads to documentation output that is essentially lies. Consider this spec:
User = Struct.new(:name, :email)
describe User do
subject { User.new("bob") }
its(:name) { should == "bob" }
end