Danger
This might void your warranty. Do it on your own risk.
I'm using the 🐟 emoji character as my SSID, because I like to be special.
namespace :deploy do | |
namespace :assets do | |
desc 'Run the precompile task locally and rsync with shared' | |
task :precompile, :roles => :web, :except => { :no_release => true } do | |
run_locally("bundle exec rake assets:precompile") | |
servers = find_servers_for_task(current_task) | |
port_option = port ? " -e 'ssh -p #{port}' " : '' | |
servers.each do |server| | |
run_locally("rsync --recursive --times --rsh=ssh --compress --human-readable #{port_option} --progress public/assets #{user}@#{server}:#{shared_path}") | |
end |
module Sprockets | |
class StaticCompiler | |
# def compile | |
# manifest = {} | |
# env.each_logical_path do |logical_path| | |
# next unless compile_path?(logical_path) | |
# if asset = env.find_asset(logical_path) | |
# manifest[logical_path] = write_asset(asset) | |
# end |
group :production do | |
gem "unicorn" | |
end |
#!/usr/bin/env ruby | |
# | |
# Whatsapp status crawler for Central America mobile phone numbers. | |
# | |
# Based on a SBD post by Alejandro Ramos: | |
# http://www.securitybydefault.com/2012/03/casi-10-millones-de-moviles-espanoles.html | |
# | |
# Modified by @hugogilmar & @andrexu for mobile phone numbers in El Salvador | |
# Trying to adapt it for mobiles from Argentina (by @PabloAlaniz) | |
#-------------------------------------------------------------------------------------- |
#import <objc/runtime.h> | |
#import <UIKit/UIKit.h> | |
@interface UIWebView (HackishAccessoryHiding) | |
@property (nonatomic, assign) BOOL hackishlyHidesInputAccessoryView; | |
@end | |
@implementation UIWebView (HackishAccessoryHiding) | |
static const char * const hackishFixClassName = "UIWebBrowserViewMinusAccessoryView"; |
require 'rubygems' | |
require 'bundler' | |
Bundler.require | |
require './application' | |
namespace :assets do | |
desc 'compile assets' | |
task :compile => [:compile_js, :compile_css] do | |
end |
after "deploy:symlink", "deploy:restart_workers" | |
after "deploy:restart_workers", "deploy:restart_scheduler" | |
## | |
# Rake helper task. | |
# http://pastie.org/255489 | |
# http://geminstallthat.wordpress.com/2008/01/27/rake-tasks-through-capistrano/ | |
# http://ananelson.com/said/on/2007/12/30/remote-rake-tasks-with-capistrano/ | |
def run_remote_rake(rake_cmd) | |
rake_args = ENV['RAKE_ARGS'].to_s.split(',') |
while sleep 15; do if [ `curl -s "http://store.apple.com/hk" |md5` != 3627b1dac6a928cfc587d5ac3be0654c ]; then open http://store.apple.com; fi done |