Skip to content

Instantly share code, notes, and snippets.

View dwchiang's full-sized avatar

Ernest Chiang dwchiang

View GitHub Profile
@dwchiang
dwchiang / keybase.md
Created May 12, 2021 00:59
Keybase proof

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

@dwchiang
dwchiang / Makefile
Created May 1, 2020 14:42
Flutter: intl_translation: extract_to_arb & generate_from_arb
.PHONY: help l10n-extract-to-arb l10n-generate-from-arb
help:
@ echo 'Available commands:'
@ echo
@ echo ' l10n-extract-to-arb : Extract app_localizations.dart into intl_messages.arb'
@ echo ' Duplicate content of intl_messages.arb into intl_xx.arb'
@ echo ' l10n-generate-from-arb : Generate messages_*.dart files from intl_*.arb'
@ echo
@ echo
@dwchiang
dwchiang / AM.md
Last active May 12, 2016 15:59
FFP: Asiamiles

#目的地

##歐洲

巴黎 (CDG), 米蘭 (MXP), 法蘭克福 (FRA), 阿姆斯特丹 (AMS), 約翰內斯堡 (JNB), 倫敦 (LHR), 曼徹斯特 (MAN), 羅馬 (FCO), 蘇黎世 (ZRH)

  • Asia Miles: F, RT = 180,000
  • Asia Miles: C, RT = 120,000
    • e.g. TPE-HKG-AMS, CX, RT, C = 120,000 + HKD 2,009
  • Asia Miles: PE, RT = 72,000
  • Asia Miles: Y, RT = 60,000
@dwchiang
dwchiang / flash_keon_1.3.sh
Created April 17, 2014 13:28
Scripts for flashing gaia v1.3 with zh-TW l10n package
#! /usr/bin/env bash
# Link https://l10n.etherpad.mozilla.org/gaia-multilocale
localecode="zh-TW"
branch="v1.3"
# This line force reads $PATH from .profile on OS X
# Ref: http://www.tech-recipes.com/rx/2621/os_x_change_path_environment_variable/
cd ~
. ./.profile echo $PATH
@dwchiang
dwchiang / .zshrc
Created April 16, 2014 10:30
gcloud with zsh
# The next line updates PATH for the Google Cloud SDK.
source /Users/dwchiang/google-cloud-sdk/path.zsh.inc
# The next line enables zsh completion for gcloud.
source /Users/dwchiang/google-cloud-sdk/completion.zsh.inc
<li><a class='home' expr:href='data:blog.homepageUrl'>Home</a></li>
<li><a href='https://reps.mozilla.org/u/dwchiang/' target='_blank'>關於</a></li>
<li><a href='#'>廚房</a></li>
<li><a href='http://talk.ernestchiang.com/search/label/%E6%AD%90%E5%B0%BC%E6%96%AF%E7%89%B9%E6%84%9B%E7%9C%8B%E6%9B%B8'>閱讀</a></li>
<li><a href='#'>技術</a>
<ul>
<li><a href='http://talk.ernestchiang.com/search/label/drupal'>Drupal</a></li>
</ul>
</li>
<li><a href='#'>社群</a>
#! /usr/bin/env bash
# Link https://l10n.etherpad.mozilla.org/gaia-multilocale
localecode="zh-TW"
branch="master"
# This line force reads $PATH from .profile on OS X
# Ref: http://www.tech-recipes.com/rx/2621/os_x_change_path_environment_variable/
cd ~
. ./.profile echo $PATH
@dwchiang
dwchiang / init_keon_gaia_1.2.sh
Created November 9, 2013 08:57
Initialize for building Gaia 1.2 on Keon
#! /usr/bin/env bash
# Link https://etherpad.mozilla.org/fxos-zhtw-1-2-qatest
localecode="zh-TW"
branch="v1.2"
branch_u="v1_2"
# Get Gaia
mkdir ~/b2g
cd ~/b2g
#!/bin/bash
filename_instance_info="instance_info.txt"
profile_list="profile_list"
for profile_name in $(cat $profile_list)
do
export AWS_DEFAULT_PROFILE=$profile_name
# Get running instances
aws ec2 describe-instances --filters Name=instance-state-name,Values=running > $filename_instance_info