Skip to content

Instantly share code, notes, and snippets.

View yicr's full-sized avatar
😆

Yicr yicr

😆
View GitHub Profile
@yicr
yicr / Android Version API Level List.md
Last active December 31, 2019 14:43
* Android Version & API Level List on 2016/08/28

Androidのバージョン表記及びAPI Level

Version Code Name Level Build.VERSION_CODES.
1.0 1 BASE
1.1 2 BASE_1_1
1.5 Cupcake 3 CUPCAKE
1.6 Donut 4 DONUT
2.0 Eclair 5 ECLAIR
2.0.1 6 ECLAIR_0_1
$ curl "https://api.example.jp/controller/action" -o /dev/null -w \
"\
Connection start %{url_effective}
resolv name start...\n\
resolv name complete @%{time_namelookup} sec\n\
target server connection start...\n\
target server connection complete @%{time_connect} sec\n\
target server http request send start...\n\
target server http request send complete @%{time_pretransfer} sec\n\
@yicr
yicr / snippet.md
Last active February 8, 2019 02:41
Mac safari http2.0 error fix by CloudFront, ALB, EC2, Apache

CloudFront ➔ ALB ➔ EC2(Apache) 構成で Safariアクセスだとエラーになったときに対処方法。

httpd.conf の以下モジュール設定をコメントアウト!

#<IfModule mod_http2.c>
#    Protocols h2 h2c http/1.1
#</IfModule>

ALB ➔ EC2 間がhttp/1.1 通信であるため、h2,h2c ヘッダが送信されてしまうためだと思う。

@yicr
yicr / snippet.md
Last active December 31, 2019 14:31
Delay execute for Android
new Handler().postDelayed(new Runnable() {
    @Override
    public void run() {
        // enter code here
    }
}, 3000);
@yicr
yicr / snippet.md
Last active December 31, 2019 14:46

Androidのバージョン表記及びAPI Level

Version Code Name Level Build.VERSION_CODES.
1.0 1 BASE
1.1 2 BASE_1_1
1.5 Cupcake 3 CUPCAKE
1.6 Donut 4 DONUT
2.0 Eclair 5 ECLAIR
2.0.1 6 ECLAIR_0_1
@yicr
yicr / snippet.md
Created February 22, 2019 06:51
EC2 Memory Usage & Disk Usage Watching by CloudWatch

1. Install package

$ sudo yum -y install perl-DateTime perl-Sys-Syslog perl-LWP-Protocol-https

2. Install Amazon CloudWatch Monitoring Scripts

$ curl https://aws-cloudwatch.s3.amazonaws.com/downloads/CloudWatchMonitoringScripts-1.2.2.zip -O
@yicr
yicr / simple-503-maintenance-html.html
Last active January 16, 2020 00:44
Simple 503 maintenance HTML
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@yicr
yicr / confirm-android-dependencies.md
Created September 26, 2019 01:17
Confirm android dependencies

ライブラリ依存の取得

$ ./gradlew -q dependencies app:dependencies --configuration compile

"Got permission denied while trying to connect to the Docker daemon socket"

### Join a docker group Execute under command.

以下のコマンドを実行し、docker グループに参加する。

sudo gpasswd -a `whoami` docker
@yicr
yicr / docker-error-saving-credentials-error-storing-credentials.md
Last active October 30, 2019 02:37
Error saving credentials: error storing credentials - err: exit status 1, out: `Cannot autolaunch D-Bus without X11 $DISPLAY`
$ docker login -u USERNAME -p PASSWORD registry.example.com
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
Error saving credentials: error storing credentials - err: exit status 1, out: `Cannot autolaunch D-Bus without X11 $DISPLAY`