Skip to content

Instantly share code, notes, and snippets.

+---------+------------+------------------+--------------------------------------------------------------+
| Group | Plugin | Option | Value |
+---------+------------+------------------+--------------------------------------------------------------+
| Default | Spork | aggressive_kill | true |
| | | cucumber_env | {"RAILS_ENV"=>"test"} |
| | | cucumber_port | 8990 |
| | | foreman | false |
| | | minitest | false |
| | | minitest_env | {} |
| | | minitest_port
@gogojimmy
gogojimmy / mac-bootstrap.sh
Created August 14, 2013 14:31
mac bootstrap script
#!/bin/sh
USERNAME=gogojimmy
mkdir ~/tmp
cd ~/tmp
# Install GCC + Git
curl https://github.com/downloads/kennethreitz/osx-gcc-installer/GCC-10.7-v2.pkg > GCC-10.7-v2.pkg
sudo installer -pkg GCC-10.7-v2.pkg -target /
.page
header.header
.logo
img src="/logo.jpg"
nav
ul.links
li= link_to '#'
article#content
#main
section
# app/model/
# Your model where you've defined has_attached_file
# Do not define :original in your styles
class Asset < ActiveRecord::Base
attr_accessible :position, :picture_cover, :asset
belongs_to(:assetable, :polymorphic => true)
has_attached_file :asset,
:styles => {
#!/usr/bin/env bash
# Pre-requisites
sudo apt-get -y update
sudo apt-get --no-install-recommends -y install build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev libgdbm-dev ncurses-dev automake libtool bison subversion pkg-config libffi-dev vim
# Download and compile Ruby 2.0.0-p0
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.gz
tar -xvzf ruby-2.0.0-p0.tar.gz
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev gcc
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.gz
tar -xvzf ruby-2.0.0-p0.tar.gz
cd ruby-2.0.0-p0/
./configure --prefix=/usr/local
make
make install

Contract Killer 3

Revised date: 07/11/2012

Between us [company name] and you [customer name]

Summary:

We’ll always do our best to fulfil your needs and meet your expectations, but it’s important to have things written down so that we both know what’s what, who should do what and when, and what will happen if something goes wrong. In this contract you won’t find any complicated legal terms or long passages of unreadable text. We’ve no desire to trick you into signing something that you might later regret. What we do want is what’s best for both parties, now and in the future.

@gogojimmy
gogojimmy / Capistrano-Deployment-Recipe.rb
Created October 11, 2012 01:05 — forked from mrrooijen/Capistrano-Deployment-Recipe.rb
a "base" Capistrano Rails Deployment Recipe. Use it to deploy your Rails application. It is also easily expandable. So feel free to grab this Recipe and add your own tasks/customization!
# Guide
# Configure the essential configurations below and do the following:
#
# Repository Creation:
# cap deploy:repository:create
# git add .
# git commit -am "initial commit"
# git push origin master
#
# Initial Deployment:
@gogojimmy
gogojimmy / HPX NPO WordPress 設定及外掛參考.md
Created September 10, 2012 15:30
HPX NPO WordPress 設定及外掛參考

#設定 WordPress

#善用第三方工具

Jimmy at gogojimmy in ~/Projects/Personal/babysworld on develop?
$ cap deploy:cold
triggering start callbacks for `deploy:cold'
* 08:05:28 == Currently executing `multistage:ensure'
*** Defaulting to `staging'
* 08:05:28 == Currently executing `staging'
* 08:05:28 == Currently executing `deploy:cold'
* 08:05:28 == Currently executing `deploy:update'
** transaction: start
* 08:05:28 == Currently executing `deploy:update_code'