Skip to content

Instantly share code, notes, and snippets.

@yachi
yachi / INSTALL.md
Last active August 29, 2015 13:56 — forked from sztupy/INSTALL.md

rage-quit plugin for oh-my-zsh

based on rage-quit support for bash

HOW TO INSTALL

Put the files below inside ~/.oh-my-zsh/custom/plugins/fuck

Also chmod a+x the flip command.

nc -v nyancat.dakko.us 23
@yachi
yachi / .gitignore
Last active August 29, 2015 14:08
download gapps
*.apk
@yachi
yachi / ruby-2.1.5-railsexpress.sh
Created November 16, 2014 17:38
ruby-install 2.1.5 with railsexpress
ruby-install -p https://raw.githubusercontent.com/skaes/rvm-patchsets/master/patches/ruby/2.1.5/railsexpress/01-zero-broken-tests.patch -p https://raw.githubusercontent.com/skaes/rvm-patchsets/master/patches/ruby/2.1.5/railsexpress/02-improve-gc-stats.patch -p https://raw.githubusercontent.com/skaes/rvm-patchsets/master/patches/ruby/2.1.5/railsexpress/03-display-more-detailed-stack-trace.patch -p https://raw.githubusercontent.com/skaes/rvm-patchsets/master/patches/ruby/2.1.5/railsexpress/04-show-full-backtrace-on-stack-overflow.patch -p https://raw.githubusercontent.com/skaes/rvm-patchsets/master/patches/ruby/2.1.5/railsexpress/05-funny-falcon-stc-density.patch -p https://raw.githubusercontent.com/skaes/rvm-patchsets/master/patches/ruby/2.1.5/railsexpress/06-funny-falcon-stc-pool-allocation.patch -p https://raw.githubusercontent.com/skaes/rvm-patchsets/master/patches/ruby/2.1.5/railsexpress/07-aman-opt-aset-aref-str.patch -p https://raw.githubusercontent.com/skaes/rvm-patchsets/master/patches/ruby/2.1.5/rails
diff --git a/vendor/gems/ngmoco-cache-money-0.2.12/lib/cash/accessor.rb b/vendor/gems/ngmoco-cache-money-0.2.12/lib/cash/accessor.rb
index dd2d56d..88f370d 100644
--- a/vendor/gems/ngmoco-cache-money-0.2.12/lib/cash/accessor.rb
+++ b/vendor/gems/ngmoco-cache-money-0.2.12/lib/cash/accessor.rb
@@ -17,7 +17,9 @@ module Cash
hits = repository.get_multi(*keys)
if (missed_keys = keys - hits.keys).any?
missed_values = block.call(missed_keys)
- hits.merge!(missed_keys.zip(Array(missed_values)).to_hash_without_nils)
+ misses = missed_keys.zip(Array(missed_values)).to_hash_without_nils
diff --git a/config/initializers/weibo_oauth.rb b/config/initializers/weibo_oauth.rb
index a117f98..1f46768 100644
--- a/config/initializers/weibo_oauth.rb
+++ b/config/initializers/weibo_oauth.rb
@@ -3,9 +3,51 @@ WEIBO_OAUTH.symbolize_keys!
module WeiboOAuth
class Client
- def upload(message, image)
- body, headers = http_multipart_data({:pic => image, :status => message})
function addJQuery(callback) {
var script = document.createElement("script");
script.setAttribute("src", "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js");
script.addEventListener('load', function() {
var script = document.createElement("script");
script.textContent = "(" + callback.toString() + ")();";
document.body.appendChild(script);
}, false);
document.body.appendChild(script);
}
@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
add this to bookmark as a url
javascript:(function(){showcontent(window.location.href);})();