This file contains 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
namespace :git do | |
task :tag_release do | |
match = release_path.match( %r{ releases/(\d+) }xm ) | |
release_tag = "releases/#{match[1]}" | |
run_locally "git tag #{release_tag}" | |
run_locally "git push --tags" | |
end | |
end | |
after 'deploy:update', 'git:tag_release' |
This file contains 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
class ActionController::TestCase | |
## It's useful to use Webrat::Matchers like assert_have_selector in functional tests | |
include Webrat::Matchers; | |
def response_body; @response.body; end | |
end |
This file contains 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
export DYLD_LIBRARY_PATH=/usr/local/mysql/lib | |
ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=`which mysql_config` |
This file contains 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 -v cmake | |
==> Downloading http://www.cmake.org/files/v2.8/cmake-2.8.4.tar.gz | |
File already downloaded and cached to /Users/ryan/Library/Caches/Homebrew | |
/usr/bin/tar xf /Users/ryan/Library/Caches/Homebrew/cmake-2.8.4.tar.gz | |
==> ./bootstrap --prefix=/usr/local/Cellar/cmake/2.8.4 --system-libs --no-system-libarchive --datadir=/share/cmake --docdir=/share/doc/cmake --mandir=/share/man | |
./bootstrap --prefix=/usr/local/Cellar/cmake/2.8.4 --system-libs --no-system-libarchive --datadir=/share/cmake --docdir=/share/doc/cmake --mandir=/share/man | |
--------------------------------------------- | |
CMake 2.8.4, Copyright 2000-2009 Kitware, Inc. | |
C compiler on this system is: /usr/bin/cc -O3 -w -pipe | |
C++ compiler on this system is: /usr/bin/c++ -O3 -w -pipe |
This file contains 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
[alias] | |
up = "!rdj_git_up() { if [[ -z `git status --porcelain` ]]; then local back=$(git name-rev --name-only HEAD); echo ======== fetch origin ========; git fetch origin && for r in devel master; do echo ======== fast-forward $r ========; git checkout $r && git merge --ff-only origin/$r; done && now=$(git name-rev --name-only HEAD); [[ $now != $back ]] && echo ======== checkout $back ======== && git checkout $back; else echo Repo is not clean; fi }; rdj_git_up" |
This file contains 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
ruby-1.9.2-p180 :008 > "These two\u00A0words should be split".scan /\w+/ | |
=> ["These", "two", "words", "should", "be", "split"] |
This file contains 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
;; On Mac OS X, GUI programs do not get a sensible PATH variable (i.e. | |
;; from /usr/libexec/path_helper). You can mitigate this by setting | |
;; the PATH variable in the binary plist file at this path: | |
;; | |
;; ~/.MacOSX/environment.plist | |
;; | |
;; Easiest way is using defaults: | |
;; | |
;; defaults write $HOME/.MacOSX/environment PATH "$HOME/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin" | |
;; |
This file contains 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
startup_message off | |
defscrollback 3000 | |
bind s # remove the flow control garbage | |
msgwait 1 | |
escape ^Jj | |
bindkey -d -k kb stuff "\010" | |
shelltitle '@|' |
This file contains 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
deploy@hardy:/u/apps/myapp/current$ rm -rf public/assets | |
deploy@hardy:/u/apps/myapp/current$ RAILS_ENV=production bundle exec rake assets:precompile | |
deploy@hardy:/u/apps/myapp/current$ find public/assets/ -size 0 | wc -l | |
0 | |
deploy@hardy:/u/apps/myapp/current$ ls -l public/assets/bg-logo-9e2504e510490de4ebcbe297364f3826.01.gif | |
-rw-r--r-- 1 deploy deploy 1174 2011-06-28 13:51 public/assets/bg-logo-9e2504e510490de4ebcbe297364f3826.01.gif | |
deploy@hardy:/u/apps/myapp/current$ RAILS_ENV=production bundle exec rake assets:precompile | |
deploy@hardy:/u/apps/myapp/current$ find public/assets/ -size 0 | wc -l | |
49 | |
deploy@hardy:/u/apps/myapp/current$ ls -l public/assets/bg-logo-9e2504e510490de4ebcbe297364f3826.01.gif |
This file contains 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
# config/initializers/active_admin.rb | |
require 'active_admin_custom_filter' | |
ActiveAdmin.setup do |config| | |
# ... | |
end |
OlderNewer