Skip to content

Instantly share code, notes, and snippets.

Here's a raugh translation of the usage guide of MozPH's community space, for reference.

社群使用規則

只有菲律賓的 ReMo 可以開門,每個人都是獨立認證。(生物認證機制、ID 卡)

社群成員在 ReMo 陪同下都可以使用該空間,視為該領頭 ReMo 的客人。該 ReMo 對客人也有陪同責任。

使用狀況須登記於 Google Spreadsheet(與 MozPH 的 Robert 詢問,他說單純是記使用時間,每週統計。也會記錄誰來了,不過只記熟面孔,訪客不記)

ct=new Array("Andorra","United Arab Emirates","Afghanistan","Antigua and Barbuda","Anguilla","Albania","Armenia","Angola","Antarctica","Argentina","American Samoa","Austria","Australia","Aruba","Åland Islands","Azerbaijan","Bosnia and Herzegovina","Barbados","Bangladesh","Belgium","Burkina Faso","Bulgaria","Bahrain","Burundi","Benin","Saint Barthélemy","Bermuda","Brunei Darussalam","Bolivia, Plurinational State of","Bonaire, Sint Eustatius and Saba","Brazil","Bahamas","Bhutan","Bouvet Island","Botswana","Belarus","Belize","Canada","Cocos (Keeling) Islands","Congo, the Democratic Republic of the","Central African Republic","Congo","Switzerland","Côte d'Ivoire","Cook Islands","Chile","Cameroon","China","Colombia","Costa Rica","Cuba","Cape Verde","Curaçao","Christmas Island","Cyprus","Czech Republic","Germany","Djibouti","Denmark","Dominica","Dominican Republic","Algeria","Ecuador","Estonia","Egypt","Western Sahara","Eritrea","Spain","Ethiopia","Finland","Fiji","Falkland Islands (Malvinas)","Micronesia, Federate
/*
Call stripGALinkerParm() after ga('send', 'pageview');
No rights reserved.
*/
function stripGALinkerParm(){
var _qs = window.location.search,
_path = window.location.pathname;
_qs = _qs.replace(/_ga=[^&]*&?/, "");
# Firefox OS Add-on in Ten Minutes
I: 先自介一下吧不然沒有人認識你
說得也是
大家好我是柏強
我在網路上的 ID 是 BobChao
B 大寫 C 大寫中間沒有空格
我在 MozTW 裡面做志工做蠻久了
@bobchao
bobchao / application.md
Last active October 3, 2015 07:35
我的申請書

Mozilla leadership gathering application

1. How many of the global gatherings would you ideally want to attend?

One of them

2. Which of the global gatherings would you like to be considered for?

Leadership Summit

@bobchao
bobchao / gua_test.js
Last active December 15, 2015 11:49
測試 Universala Analytics
var https = require('https');
var querystring = require('querystring');
function ga() {
var _useragent = 'GUATester/1.0 GUA/1.0';
var _param = {
v: '1',
tid: '%replace_with_your_UA_id%',
cid: ''
};
  1. 請先 clone https://github.com/moztw/gaia-distribution-sample.git
  2. 接著下 gaia 的 make 指令時指定此資料夾為 GAIA_DISTRIBUTION_DIR 即可(請用 reset-gaia)

例:

GAIA_DISTRIBUTION_DIR=~/Code/gaia-distribution-sample MOZILLA_OFFICIAL=1 PRODUCTION=1 GAIA_KEYBOARD_LAYOUTS=en,zh-Hant-Zhuyin LOCALE_BASEDIR=locales/ LOCALES_FILE=locales/languages_zhtw.json GAIA_DEFAULT_LOCALE=zh-TW NOFTU=1 make reset-gaia

ps. 我習慣把 FTU 關掉,因為太常刷、要常按很煩。如果你是為了測試 l10n 字串,建議還是打開(把 NOFTU=1 刪掉),因為導覽畫面還是有不少重要字串。

@bobchao
bobchao / gist:7805113
Last active December 30, 2015 08:49
Building Firefox OS (B2G) - Geeksphone Keon + Ubuntu 12.04.03 + Mac OS X
@bobchao
bobchao / gist:7805230
Created December 5, 2013 13:36
甘苦誰人知
我這次撞超多牆的。
之前在 Mac 下編本來都很 ok,然後突然某天起怎麼編怎麼怪(在手機上記憶體不足等各種問題),上 MDN 看就看到「如果你拿的是 Keon,用 Mac 編現在一定死」
不得已只好來裝 VM,然後載了 Ubuntu 13.10 32bits,裝完看文件開宗明義就寫需要 64bits 版....
於是又載 13.10,編半天都失敗 -- 空間不足。奇怪,不是說要 25G 嗎?我有留呀?... 啊我這白痴,25G 是要 free space,我只用 25G 的硬碟裝作業系統完就不夠了啊...
再重裝,這次給 50G,但仍然各種不同失敗。上 IRC 碎念了以後決定回到 12.04 LTS -- 終於一個晚上過去它編成功了,但變成 permission denied.
curl -sf https://raw.githubusercontent.com/brson/multirust/master/blastoff.sh | sh
multirust update
cargo install racer
cd /usr/local/src
git clone https://github.com/rust-lang/rust.git
nano ~/.bash_profile
加入
export PATH="$HOME/.multirust/toolchains/stable/cargo/bin:$PATH"