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
require 'capistrano/version' | |
load 'deploy' | |
# Customize the following variables | |
set :domain, "host.example.com" | |
set :user, "username" | |
set :application, "my_wordpress_blog" | |
set :deploy_to, "/var/www/apps/#{application}" | |
# These variables probably don't need to change |
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
(function($) { | |
$.fn.defaultvalue = function() { | |
// Scope | |
var elements = this; | |
var args = arguments; | |
var c = 0; | |
return( | |
elements.each(function() { | |
$(this).css('color', '#aaa'); |
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
# outtolunch_template | |
file 'config/routes.rb', <<-CODE | |
ActionController::Routing::Routes.draw do |map| | |
end | |
CODE | |
file 'config/initializers/uri_ext.rb', <<-CODE | |
URI::PATTERN::UNRESERVED.replace("+-_.!~*'()a-zA-Z\\d") | |
CODE |
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
# mig_rails_template.rb | |
file 'config/routes.rb', <<-CODE | |
ActionController::Routing::Routes.draw do |map| | |
end | |
CODE | |
run "rm public/index.html" | |
run "rm public/images/rails.png" | |
run "rm public/favicon.ico" |
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
document.cookie.split(';').each(function(cookie) { | |
if(cookie.indexOf('__utmz') != '-1') utmz = cookie; | |
}); | |
var cpc_regex = new RegExp(".*?utmcmd=([a-z]+)\|"); | |
medium = utmz.match(cpc_regex)[1]; | |
var gclid_regex = new RegExp(".*?utmgclid=([\_0-9A-Za-z]+)\|"); | |
adwords = utmz.match(gclid_regex)[1]; |
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 TopExitPagesReport | |
include Garb::Resource | |
include ReportHelper | |
metrics :pageviews, :exit_rate, :exits | |
dimensions :request_uri | |
def self.results_for(profile, date) | |
new(profile, date) | |
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
curl -O http://ftp.gnu.org/pub/gnu/gettext/gettext-0.17.tar.gz | |
tar xvzf gettext-0.17.tar.gz | |
cd gettext-0.17 | |
./configure --prefix=/usr/local | |
make | |
sudo make install | |
cd .. | |
sudo perl -MCPAN -e 'shell' | |
cpan> install Locale::gettext |
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
(defun refresh-file () | |
(interactive) | |
(revert-buffer t t t) | |
) | |
(global-set-key [f5] 'refresh-file) |
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
# Sending Public Key to Remote Servers | |
function authme { | |
ssh $1 'cat >>.ssh/authorized_keys' <~/.ssh/id_rsa.pub | |
} |