Skip to content

Instantly share code, notes, and snippets.

@yachi
yachi / a.txt
Created October 24, 2017 08:54
alpine dig
docker run --rm -it alpine sh -c 'apk add --update bind-tools; dig google.com.hk; dig @8.8.8.8 google.com.hk'
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.6/community/x86_64/APKINDEX.tar.gz
(1/4) Installing libgcc (6.3.0-r4)
(2/4) Installing libxml2 (2.9.4-r4)
(3/4) Installing bind-libs (9.11.1_p1-r1)
(4/4) Installing bind-tools (9.11.1_p1-r1)
Executing busybox-1.26.2-r5.trigger
OK: 9 MiB in 15 packages
@yachi
yachi / a.txt
Created October 24, 2017 02:22
gcloud sdk versions
curl -s https://cloud.google.com/sdk/docs/release-notes | pup 'h2 text{}'
176.0.0 (2017-10-18)
175.0.0 (2017-10-11)
174.0.0 (2017-10-04)
173.0.0 (2017-09-27)
172.0.1 (2017-09-21)
172.0.0 (2017-09-20)
171.0.0 (2017-09-13)
170.0.1 (2017-09-08)
170.0.0 (2017-09-06)

Keybase proof

I hereby claim:

  • I am yachi on github.
  • I am yachi (https://keybase.io/yachi) on keybase.
  • I have a public key ASCduRaM3vFfKq2Gk5zottNcL7GPIgFIFo2ABRcqIpBdXQo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am yachi on github.
  • I am yachi (https://keybase.io/yachi) on keybase.
  • I have a public key ASCHDr6JZWHEbOdauYtAlEo-jLTcnl_NYeRnt3XaEsxwmgo

To claim this, I am signing this object:

@yachi
yachi / update_binaries.sh
Created July 20, 2016 09:20
flash base and vendor.img
#!/usr/bin/env bash
curl -s https://developers.google.com/android/nexus/images | pup 'a attr{href}' | grep '/angler-' | tail -n1 | aria2c -c -i -
rm -r angler-*/
tar xzvf "$(find . -iname 'angler-*-factory-*'|tail -n1)"
cd angler-* || exit
unzip image-angler-*.zip
./flash-base.sh
fastboot flash vendor vendor.img
cd - || exit
curl $(cat url) | pup 'a[href^="magnet:"] attr{href}' | aria2c -i -
@yachi
yachi / a.sass
Last active March 29, 2016 05:34
a
b: #000 b: #002 b: #004 b: #006 b: #008 b: #00a b: #00c b: #00e
b: #020 b: #022 b: #024 b: #026 b: #028 b: #02a b: #02c b: #02e
b: #040 b: #042 b: #044 b: #046 b: #048 b: #04a b: #04c b: #04e
b: #060 b: #062 b: #064 b: #066 b: #068 b: #06a b: #06c b: #06e
b: #080 b: #082 b: #084 b: #086 b: #088 b: #08a b: #08c b: #08e
b: #0a0 b: #0a2 b: #0a4 b: #0a6 b: #0a8 b: #0aa b: #0ac b: #0ae
b: #0c0 b: #0c2 b: #0c4 b: #0c6 b: #0c8 b: #0ca b: #0cc b: #0ce
b: #0e0 b: #0e2 b: #0e4 b: #0e6 b: #0e8 b: #0ea b: #0ec b: #0ee
b: #200 b: #202 b: #204 b: #206 b: #208 b: #20a b: #20c b: #20e
diff --git a/Gemfile b/Gemfile
index 16ab922..62a5142 100644
--- a/Gemfile
+++ b/Gemfile
@@ -114,6 +114,9 @@ source 'https://rubygems.org' do
# date range picker
gem 'bootstrap-daterangepicker-rails'
+ # full text search for postgresql
+ gem 'textacular'
@yachi
yachi / -
Created December 4, 2015 03:49
[tunemygc] not enabled
Calm down, yo.
WARNING: `:suite` hooks do not support metadata since they apply to the suite as a whole rather than any individual example or example group that has metadata. The metadata you have provided ({:type=>:feature}) will be ignored. Called from /app/spec/rails_helper.rb:88:in `block in <top (required)>'.
Run options:
include {:focus=>true}
exclude {:broken=>#<Proc:./spec/rails_helper.rb:72>}
All examples were filtered out; ignoring {:focus=>true}
Randomized with seed 53941
@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