Install (copy & paste):
curl -sL raw.github.com/gist/1676577/travis.rb > ~/bin/travis \
&& chmod +x ~/bin/travis
gem install hub | tail -2
ruby -e 'require "json"' 2>/dev/null || gem install json
FileMerge (opendiff) can really come in handy when you need to visually compare merging conflicts. Other times it's just a nice visual way to review your days work.
The following method works by creating a simple bash script (git-diff-cmd.sh) that sets us up with the proper command line arguments for Git to pass off files to FileMerge.
;(function(w, d, undefined){ | |
'use strict'; | |
var $ = function (e) { | |
var firstChar = e.charAt(0); | |
if (firstChar === '#') { | |
return d.querySelector(e); | |
} else if (firstChar === '.') { | |
return d.querySelectorAll(e); |
#!/usr/bin/ruby | |
class Array | |
def sum | |
inject( 0 ) { |sum,x| sum+x } | |
end | |
def sum_square | |
inject( 0 ) { |sum,x| sum+x*x } | |
end | |
def *(other) # dot_product |
// Media Queries in Sass 3.2 | |
// | |
// These mixins make media queries a breeze with Sass. | |
// The media queries from mobile up until desktop all | |
// trigger at different points along the way | |
// | |
// And important point to remember is that and width | |
// over the portrait width is considered to be part of the | |
// landscape width. This allows us to capture widths of devices | |
// that might not fit the dimensions exactly. This means the break |
require "openssl" | |
require "net/smtp" | |
Net::SMTP.class_eval do | |
private | |
def do_start(helodomain, user, secret, authtype) | |
raise IOError, 'SMTP session already started' if @started | |
check_auth_args user, secret if user or secret | |
sock = timeout(@open_timeout) { TCPSocket.open(@address, @port) } |
user mauricio users; #this should be the username and the main group of the user that's going to deploy the application | |
worker_processes 4; | |
error_log logs/error.log; | |
pid logs/nginx.pid; | |
events { | |
worker_connections 1024; | |
} |
$(document).ready(function($) { | |
$('#gallery-slideshow, .gallery-controls').hide(); | |
$('#loading').show(); | |
var last_slide = $('#gallery-slideshow li img:last'); | |
var last_image_attr = last_slide.attr("src"); | |
last_slide.onImagesLoad({ | |
itemCallback: itemImagesLoaded | |
}); | |
function itemImagesLoaded(){ | |
$('#gallery-slideshow, .gallery-controls').show(); |
unless params[:golf_club_photo].nil? | |
Notifier.deliver_gc_images_uploaded(admin_gcsf_details_url('basic','golf_club_photo',@full_gc),@golf_club_photo, golf_club_show_url('home',@full_gc)) | |
end |
desc "Load production data into development database" | |
task :import_remote_db do | |
filename = "dump.#{Time.now.strftime '%Y-%m-%d_%H:%M:%S'}.sql" | |
dbuser = "yourusername" | |
dbhost = "yourhostname" | |
dbpassword = "yourpassword" | |
application_db = "yourdatabasename" | |
local_db_host = "localhost" | |
local_db_user = "local_user_name" |