Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
# Bundler Integration | |
require "bundler/capistrano" | |
# Application Settings | |
set :application, "yourapplicationname" | |
set :user, "serveruser" | |
set :deploy_to, "/home/#{user}/rails-applications/#{application}" | |
set :rails_env, "production" | |
set :use_sudo, false | |
set :keep_releases, 3 |
Get Homebrew installed on your mac if you don't already have it
Install highlight. "brew install highlight". (This brings down Lua and Boost as well)
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath | |
{ | |
static NSString *CellIdentifier = @"Cell"; | |
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; | |
// Configure the cell... | |
if (!cell) { | |
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault | |
reuseIdentifier:CellIdentifier] autorelease]; | |
} |
If you have two days to learn the very basics of modelling, Domain-Driven Design, CQRS and Event Sourcing, here's what you should do:
In the evenings read the [Domain-Driven Design Quickly Minibook]{http://www.infoq.com/minibooks/domain-driven-design-quickly}. During the day watch following great videos (in this order):
[ | |
{ "keys": ["ctrl+alt+super+d"], "command": "toggle_side_bar" }, | |
{ "keys": ["super+l"], "command": "show_overlay", "args": {"overlay": "goto", "text": ":"} }, | |
{ "keys": ["super+shift+l"], "command": "expand_selection", "args": {"to": "line"} }, | |
{ "keys": ["super+shift+c"], "command": "expand_selection", "args": {"to": "scope"} }, | |
{ "keys": ["super+shift+j"], "command": "expand_selection", "args": {"to": "indentation"} }, | |
{ "keys": ["ctrl+super+r"], "command": "reveal_in_side_bar" }, | |
{ "keys": ["alt+shift+up"], "command": "select_lines", "args": {"forward": false} }, | |
{ "keys": ["alt+shift+down"], "command": "select_lines", "args": {"forward": true} }, | |
{ "keys": ["ctrl+shift+<"], "command": "erb" }, |
// Based on Glacier's example: http://docs.aws.amazon.com/AWSJavaScriptSDK/guide/examples.html#Amazon_Glacier__Multi-part_Upload | |
var fs = require('fs'); | |
var AWS = require('aws-sdk'); | |
AWS.config.loadFromPath('./aws-config.json'); | |
var s3 = new AWS.S3(); | |
// File | |
var fileName = '5.pdf'; | |
var filePath = './' + fileName; | |
var fileKey = fileName; |
# Simple class to decorate a method and send information MiniProfiler | |
# Usage: CustomMiniProfiler.measure MyClass, :mymethod, "This method takes..." | |
class CustomMiniProfiler | |
def self.measure klass, method, message, class_method=false | |
receptor_class = class_method ? klass.singleton_class : klass | |
receptor_class.send :define_method, "#{method}_with_mini_profiler" do |*args, &block| | |
Rack::MiniProfiler.step(message) do | |
send "#{method}_without_mini_profiler", *args, &block | |
end |