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
@yachi
yachi / bundle_grep.sh
Created September 30, 2013 04:45
bundle grep, similar to git grep but for gems in Gemfile
# grep -r "$@" `bundle show --paths`
# ack "$@" `bundle show --paths`
function bung(){
ag "$@" `bundle show --paths`
}
@yachi
yachi / install.sh
Last active December 21, 2015 17:08
to start using git flow
#!/bin/sh
#
brew install git-flow
brew uninstall git
brew install git --without-completions
echo
echo
echo
echo "==================================="
@yachi
yachi / test.rb
Last active December 21, 2015 08:49 — forked from anonymous/test.rb
def runner(v1, &block)
puts v1
yield(v1) if block_given?
end
runner "jithub"
runner "OHAI" do |v1|
puts "ARRAR"
puts v1