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
git config --global alias.ci commit | |
git config --global alias.co checkout | |
git config --global alias.st status |
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
git config --global alias.co checkout | |
git config --global alias.br branch | |
git config --global alias.ci commit | |
git config --global alias.st status | |
git config --global alias.unstage 'reset HEAD --' | |
git config --global alias.last 'log -1 HEAD' |
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
# vim:se filetype=ruby | |
# vim:se foldlevel=3 | |
# | |
# Hacks and monkeys to run Symfony 1.4 applications as Rack apps using | |
# the rack-legacy and rack-rewrite gems. | |
# | |
# A couple of rack-rewrite rules take care of handing requests to the | |
# default front controller (index.php) and a subclass of rack-legacy's | |
# Php fixes PATH_INFO for Symfony routing. | |
# |
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
#!/bin/bash | |
set -e | |
cd /usr/lib/rabbitmq/lib/rabbitmq_server-2.6.1/plugins | |
wget \ | |
--timestamping \ | |
http://www.rabbitmq.com/releases/plugins/v2.6.1/\ | |
{\ | |
mochiweb-1.3-rmq2.6.1-git9a53dbd.ez,\ |
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 :assets do | |
desc "Check that all assets have valid encoding" | |
task :check => :environment do | |
paths = ["app/assets", "lib/assets", "vendor/assets"] | |
extensions = ["js", "coffee", "css", "scss"] | |
paths.each do |path| | |
dir_path = Rails.root + path |
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
$.getScript('http://cdn.jsdelivr.net/jquery.lazyload/1.8.4/jquery.lazyload.js', function() { | |
var $popup = $('<div></div>').css({ | |
position: 'fixed' | |
}); | |
$('body').append($popup); | |
$('a[href*="/rent/flat/"]').lazyload({ | |
threshold : 200, | |
appear: function(elements_left, settings) { | |
var $container = $(this).closest('div'); | |
$.get($(this).attr('href'), function (data) { |
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
after_fork do |server, worker| | |
# Override the default logger to use a separate log for each Unicorn worker. | |
# https://github.com/rails/rails/blob/3-2-stable/railties/lib/rails/application/bootstrap.rb#L23-L49 | |
Rails.logger = ActiveRecord::Base.logger = ActionController::Base.logger = begin | |
path = Rails.configuration.paths["log"].first | |
f = File.open(path.sub(".log", "-#{worker.nr}.log"), "a") | |
f.binmode | |
f.sync = true | |
logger = ActiveSupport::TaggedLogging.new(ActiveSupport::BufferedLogger.new(f)) |
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
#!/bin/bash | |
# Script to instruct the Mac how to route packets to the | |
# software defined network where containers created via boot2docker | |
# reside. This lets you casually directly to ports (ssh, http, etc. etc.) | |
# on those containers. | |
function ERROR(){ echo "ERROR: $*" ; } | |
function FAIL(){ echo "FAILING: $*" ; exit 1; } | |
if [[ 'running' != $(boot2docker status) ]] | |
then FAIL "boot2docker's VM not running" ; fi | |
IP_OF_DOCKER_HOST=$(boot2docker ip 2> /dev/null) |
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
// Install the latest Xcode, with the Command Line Tools. | |
// Install Homebrew | |
// Install aircrack-ng: | |
brew install aircrack-ng | |
// Create the following symlink: | |
sudo ln -s /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport /usr/local/sbin/airport | |
// Figure out which channel you need to sniff: | |
sudo airport -s |
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 :db do | |
task :pull do | |
run "cd #{current_release} && RAILS_ENV=#{rails_env} rake db:data:dump" | |
download "#{current_release}/db/data.yml", "db/data.yml" | |
`rake db:reset db:data:load` | |
end | |
end |
OlderNewer