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
# COLORS | |
LIGHT_GRAY="\[\033[0;37m\]"; BLUE="\[\033[1;36m\]"; RED="\[\033[0;31m\]"; LIGHT_RED="\[\033[1;31m\]"; | |
GREEN="\[\033[0;32m\]"; WHITE="\[\033[1;37m\]"; LIGHT_GRAY="\[\033[0;37m\]"; YELLOW="\[\033[1;33m\]"; | |
# GIT PROMPT (http://gist.github.com/120804) | |
function parse_git_branch { | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \(\1\)/'; | |
} | |
function parse_git_status { | |
git status 2> /dev/null | sed -e '/(working directory clean)$/!d' | wc -l; | |
} |
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
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
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
# http://ph7spot.com/musings/getting-started-with-autotest | |
$ gem install redgreen autotest-standalone autotest-fsevent autotest-growl autotest-rails-pure | |
$ mate ~/.autotest | |
require 'redgreen/autotest' | |
require 'autotest/timestamp' | |
require 'autotest/growl' | |
require 'autotest/fsevent' | |
require "autotest/restart" |
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
# brew install git bash-completion | |
# Completion | |
if [ -f `brew --prefix`/etc/bash_completion ]; then | |
. `brew --prefix`/etc/bash_completion | |
fi | |
# Editor | |
export EDITOR='mate -w' |
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
# delayed job priority ranges. Higher values represent lower priority. | |
PRIORITY_RANGES = [(0..9), (10..19)] | |
2.times do |num| | |
God.watch do |w| | |
w.name = "dj-#{num}" | |
w.group = 'dj' | |
w.interval = 30.seconds | |
w.start = "rake -f #{RAILS_ROOT}/Rakefile RAILS_ENV=production MIN_PRIORITY=#{PRIORITY_RANGES[num].first} MAX_PRIORITY=#{PRIORITY_RANGES[num].last} jobs:work" | |
w.log = "/var/log/god/god.log" |
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
include mime.types; | |
default_type application/octet-stream; | |
access_log logs/access.log; | |
sendfile on; | |
keepalive_timeout 65; | |
tcp_nodelay on; | |
tcp_nopush on; |
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
--- | |
:update_sources: true | |
:sources: | |
- http://gems.rubyforge.org/ | |
- http://gems.github.com | |
:benchmark: false | |
:bulk_threshold: 1000 | |
:backtrace: false | |
:verbose: true | |
gem: --no-ri --no-rdoc |
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
# http://antonio.ognio.com/2010/07/28/installing-redis-on-linux-and-mac-os-x/ | |
wget http://redis.googlecode.com/files/redis-2.2.2.tar.gz | |
tar -xzvf redis-2.2.2.tar.gz | |
cd redis-2.2.2 && sudo make && sudo make install | |
Five binaries will be installed to /usr/local/bin, redis-server, redis-benchmark, redis-cli, redis-check-dump and redis-check-aof. You’ll have to manually copy the Redis configuration file to /etc like this: | |
sudo mkdir /etc/redis | |
sudo cp redis.conf /etc/redis/redis.conf |
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
- Run software update | |
- Install Purchased Apps from App Store | |
- Disable caps lock key (Sys Pref => Keyboard => Modifier Keys) | |
- System Pref -> Expose -> Setup corners for spaces and expose | |
+ System Pref -> Security -> Sleep Password | |
- Setup Dropbox to Get Files | |
- Install 1Password | |
- Use dropbox synced file for keychain | |
- Install browser extension for chrome | |
- Install Prey |
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
[mysqld] | |
# | |
# * Networking | |
# | |
# Instead of skip-networking the default is now to listen only on | |
# localhost which is more compatible and is not less secure. | |
bind-address = 192.168.xxxx.xxxx | |
# |
OlderNewer