git fetch origin master
== fetch any updates from the remote repository called origin's master
branch.
OR
git pull origin master
== fetch any updates AND merge them into mine
origin [email protected]:ezkl/code.ipsrvcs.com.git (fetch)
git fetch origin master
== fetch any updates from the remote repository called origin's master
branch.
OR
git pull origin master
== fetch any updates AND merge them into mine
origin [email protected]:ezkl/code.ipsrvcs.com.git (fetch)
# Much more realistic context. | |
def extract_prefix_from_path(path) | |
/(?<prefix>.+)_path/ =~ path.to_s ? prefix : false | |
end | |
path = extract_prefix_from_path("homepath") | |
puts path #=> false | |
puts extract_prefix_from_path("home_path") #=> home |
desc "Import incoming calls" | |
task :fetch_incomingcalls => :environment do | |
# Logs into manage.phoneprovider.co.uk and retrieved list of incoming calls. | |
require 'rubygems' | |
require 'mechanize' | |
require 'logger' | |
# Create a new mechanize object | |
agent = Mechanize.new { |a| a.log = Logger.new(STDERR) } |
#!/usr/bin/env bash | |
apt-get -y update | |
apt-get -y upgrade | |
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev | |
cd /tmp | |
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p194.tar.gz | |
tar -xvzf ruby-1.9.3-p194.tar.gz | |
cd ruby-1.9.3-p194/ | |
./configure --prefix=/usr/local | |
make |
This script installs a patched version of ruby 1.9.3-p194 with patches for boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84). It also includes the new backported GC from ruby-trunk.
Huge thanks to funny-falcon for the performance patches.
This script installs a patched version of ruby 1.9.3-p327 with boot-time performance improvements (#66 and #68), and runtime performance improvements (#83 and #84). It also includes the new backported GC from ruby-trunk.
Many thanks to funny-falcon for the performance patches.
/* How to calculate postgreSQL database size in disk ? */ | |
SELECT pg_size_pretty(pg_database_size('thedbname')); | |
/* Calculate size of a table including or excluding the index */ | |
SELECT pg_size_pretty(pg_total_relation_size('big_table')); | |
SELECT pg_size_pretty(pg_relation_size('big_table')); /* without index */ | |
/* See indexes on a table with `\d tablename` */ |