Skip to content

Instantly share code, notes, and snippets.

@joar
joar / README.rst
Last active March 21, 2022 06:30
Using unicode in your SSID on ASUS RT-AC66U, in ASUSWRT

Using unicode in your SSID on ASUS RT-AC66U

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.

How I do it

@yachi
yachi / precompile.cap.rb
Created September 28, 2012 04:38
precompile rails 3 assets locally
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
@yachi
yachi / sprockets_debug.rb
Created June 18, 2012 08:52
sprokets compile debug
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
@dpettigrew
dpettigrew / UIButton+AFNetworking.h
Created June 13, 2012 19:11
UIButton Category for AFNetworking adds - (void)setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholderImage forState:(UIControlState)state
//
// UIButton+AFNetworking.h
//
// Created by David Pettigrew on 6/12/12.
// Copyright (c) 2012 ELC Technologies. All rights reserved.
//
// Based upon UIImageView+AFNetworking.h
//
// Copyright (c) 2011 Gowalla (http://gowalla.com/)
@nebiros
nebiros / Gemfile
Created May 23, 2012 15:58
rails + unicorn + rbenv + init.d daemon
group :production do
gem "unicorn"
end
@Pablitis
Pablitis / whatsapp.rb
Created March 18, 2012 17:54 — forked from serdna/whatsapp.rb
Whatsapp status crawler for Central America mobile phone numbers.
#!/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)
#--------------------------------------------------------------------------------------
@bjhomer
bjhomer / UIWebView+AccessoryHiding.m
Created March 16, 2012 05:03
Hiding the inputAccessoryView of a UIWebView
#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";
@jeffreyiacono
jeffreyiacono / Rakefile
Created February 8, 2012 20:15
rake task for precompiling assets using sprockets within a sinatra app + view helpers
require 'rubygems'
require 'bundler'
Bundler.require
require './application'
namespace :assets do
desc 'compile assets'
task :compile => [:compile_js, :compile_css] do
end
@bkutil
bkutil / deploy.rb
Created December 4, 2011 22:22 — forked from andruby/deploy.rb
Start and Stop tasks for resque workers and resque scheduler with capistrano deploy hook (without God)
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(',')
@yachi
yachi / siteisup.sh
Created November 4, 2011 06:57
有貨未
while sleep 15; do if [ `curl -s "http://store.apple.com/hk" |md5` != 3627b1dac6a928cfc587d5ac3be0654c ]; then open http://store.apple.com; fi done