Skip to content

Instantly share code, notes, and snippets.

View theill's full-sized avatar

Peter Theill theill

View GitHub Profile
@theill
theill / gist:78025
Created March 12, 2009 11:23
In case you are not a shell wiz you may switch to Ruby to execute simple tasks e.g. unpacking a number of zip files
ruby -e "1999.upto(2009) do |year| 1.upto(4) do |no| cmd = \"unzip #{year}_#{no}.zip -d #{year}_#{no}\"; system cmd; end; end"
get disk usage for all subdirectories
du -hs *
namespace :app do
namespace :db do
desc "Copy entire database into current environment"
task :load => :environment do
db_config = ActiveRecord::Base.configurations[RAILS_ENV]
case RAILS_ENV
when 'development'
db_config_source = ActiveRecord::Base.configurations[DEVELOPMENT_SOURCE]
sh %{ssh -l deploy -C #{STAGING_DOMAIN} mysqldump -u #{db_config_source['username']} --password=#{db_config_source['password']} #{db_config_source['database']} | mysql -u #{db_config['username']} --password=#{db_config['password']} #{db_config['database']}}
Pod::Spec.new do |s|
s.name = "AFAmazonS3Client"
s.version = "2.0.0"
s.summary = "AFNetworking Client for the Amazon S3 API."
s.homepage = "https://github.com/AFNetworking/AFAmazonS3Client"
s.social_media_url = "https://twitter.com/AFNetworking"
s.license = 'MIT'
s.author = { "Mattt Thompson" => "m@mattt.me" }
s.source = { :git => "https://github.com/AFNetworking/AFAmazonS3Client.git",
:tag => "2.0.0" }
/**
* @(#)SwatchITime.java
* @version 0.5 01/09/99
* @version 1.0 01/10/99
* @author Peter Theill
*
* This Applet displays current time using Internet Time: a new
* international timeformat invented by Swatch. The SwatchITime
* applet automatically updates every second (or in userdefined
* intervals) to symbolize a running clock. Furthermore, you'll