Tested in Mac OS X: super == command
Open/Goto
- super+t: go to file
- super+ctrl+p: go to project
- super+r: go to methods
var React = require('react/addons'), | |
TestUtils = React.addons.TestUtils, | |
TestContext = require('./TestContext'), | |
App = require('./App.jsx'), | |
app = TestContext.getRouterComponent(App); | |
describe('App', function() { | |
it('has something', function() { | |
expect(app.getDOMNode().textContent).toContain('something'); | |
}); |
#!/bin/bash | |
# | |
# this script will attempt to detect any ephemeral drives on an EC2 node and create a RAID-0 stripe | |
# mounted at /mnt. It should be run early on the first boot of the system. | |
# | |
# Beware, This script is NOT fully idempotent. | |
# | |
METADATA_URL_BASE="http://169.254.169.254/2012-01-12" |
#!/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 | |
# |
Navigation: | |
cmd-p Goto Anything ('@' for functions, ':' for line number) | |
cmd-r Function finder | |
ctl-g Goto line number | |
cmd-sft-p Command palette | |
cmd-sft-f Find in Files | |
cmd-opt-r Toggle regex when finding | |
cmd-opt-# Columns | |
ctr-# Switch columns |
# autoload concerns | |
module YourApp | |
class Application < Rails::Application | |
config.autoload_paths += %W( | |
#{config.root}/app/controllers/concerns | |
#{config.root}/app/models/concerns | |
) | |
end | |
end |
Designers need fleshed out pages to do properly design a screen. | |
In the past, we've loaded test fixtures in development to give them that. | |
But test fixtures are not a good fit for this. | |
They're designed to make testing easy, not designing. | |
What we need instead is a way for a designer to create a dataset | |
that'll work great for design and then save that as a snapshot. | |
This snapshot can be named and reloaded as often as desired. | |
I envision it'll work like this: |
class User < ActiveRecord::Base | |
has_secure_password | |
attr_accessible :email, :password, :password_confirmation | |
validates_presence_of :email | |
validates_uniqueness_of :email | |
def self.authenticate(email, password) | |
find_by_email(email).try(:authenticate, password) |