Tumgik
leebart · 10 years
Link
solarized - precision color scheme for multiple applications (terminal, vim, etc.) with both dark/light modes
0 notes
leebart · 10 years
Text
電動店
突然想起一段往事,高中放學後常跟同學一起在興南夜市旁的小巷內打電動,那是一間小小的雜貨店,賣些小孩吃的餅乾糖果, 或一些日常雜貨如飲料罐頭之類的,而店裡伴隨著格鬥天王電動的背景音樂居然是... ICRT廣播... 據說是老闆的小孩都在美國, 開雜貨店只是興趣,順便練英文才是真的... 好吧,又是濃濃的鄉愁 :p
0 notes
leebart · 10 years
Link
W Alma ave
right -> Plum St
right -> Willow St
left -> S 1st St
Right -> E Reed St
Right - > S 7Th St
right -> Keyes St
left - > S 1st St
Right - >E Alma Ave
the other route
E Alma Ave
right -> Ford Ave
right -> Cottage Grove Ave
left -> Pomona Ave
left -> San Jose Ave
left -> Monterey Rd
left -> E Alma Ave
right -> Plum St
left -> Goodyear St
left -> Palm St
left -> Floyd St
right -> Vine St
left -> W Alma ave
0 notes
leebart · 10 years
Link
after you have cert & p12 files, launch terminal and
openssl x509 -in cert.cer -inform DER -outform PEM -out cert.pem
openssl pkcs12 -in key.p12 -out key.pem -nodes
if your cert on Apple dev website is a sandbox one, choose sandbox push server to test it!
0 notes
leebart · 10 years
Text
灣區買車攻略
1. 進到美國後 5 天就可以去辦理 SSN, 隔兩天就可以進 SSA 問 SSN 號碼 (說是公司保險要填 SSN 然後報個父母英文姓名就 OK)
2. 有SSN後,就可以開租的車去 DMV 進行筆試,有中文考卷,有台灣監理所發的國際駕照 + 台灣駕照就可以換 暫時駕照(temporary driver license)
3. 買車有多種選擇
i. 上 craig list 或是 hertz 或是 車商網站 買二手車
ii. 去車商 a. 現金買車 b. 貸款買車 c.長期租車
craig list 好處是價錢透明,缺點是車況不明,建議懂車的人買 (除非前車主你認識)
hertz 好處是車很新(一般三年內),價錢合理,缺點是以前租這台車的人很有可能不管車況亂操
車商網站的 中古認證車 (Certified Pre-Owned),價錢貴,好處是有保固
現金買車... 不用說有錢就買吧
通勤用的 Ford, Nissan, Honda, Toyota 2萬以內就有,油電混合的 Prius 只要兩萬初,Mini 也只要兩萬初, BMW, BENZ, Audi, Lexus 三萬初
美國油價大概是 3.8 - 4.1 USD / Gallon, 不算太貴,但是通勤距離遠的話,郵電混合車就有很大的優勢
貸款買車... 如果 美國信用評比(Credit Score)不高, 例如剛進美國的話就是0
貸款利率大概是 7-10%, 非常不建議貸款,除非你只貸個 5000 - 10000 貸一年累積信用
長期租車... 就算信用評比不高也算是好選擇(信用評比0也可以獲得 MF 0.0017 的利率),只要付出 (車價-三年後車的殘餘價值- 首付 Down payment) / 36 就是月付額 一般來說 200-500元一個月就能租到一台不錯的車,過三年後可以用殘餘價值將車買下來,或是還車給車商
4. 買車開走前一定要保險
如果你有台灣監理所開的 三年以上無肇事記錄,就可以試試 statefarm 或是 farmer的保險,比較便宜,建議的方法是直接跟agent談才便宜(前半年每個月還是要一百多美金...)
5. 打電話到 DMV 或是 直接去 DMV 預約路考,路考路線可以查 Google 關鍵字( 城市名 + dmv route drive test ) 
0 notes
leebart · 10 years
Text
美國買車攻略
1. Used Car
Craigslist
https://sfbay.craigslist.org/cto/
eBay
直接跟車主交易的優點是便宜,缺點是不知道車況,但可用VIN去Autocheck 及 CarFax查歷任車主及肇事記錄
直接跟車商買認證的二手車,缺點是比較貴
跟仲介商(deler)買二手車,缺點是陷阱多
跟CarMax買,優點是透明,缺點是比較貴
2. Lease Car
http://www.forbes.com/pictures/ehmk45kjek/bmw-3-series/
二年到四年的租期
優點是新車,付2000-4000 USD 即可拿車,每個月付99-399即可,原廠維修保養都是原廠付錢,出事故後也不擔心車價低賣不掉,因為租期到直接不續約就好。
缺點是保險貴,租期到的時候要考量要不要買下這部車或放棄,放棄的話首付的錢也沒了,通常一個月有里程限制 1000-1200 miles, 超過要付錢
3. Used Car from car rental company
http://www.hertzcarsales.com/Search#pageSize=40&pageNumber=1&Distance=100mi&MapLat=37.3417887&MapLong=-121.6429827&Makes=Honda,Mazda,Nissan,Volkswagen,Ford&Models=Civic,Fit,Mazda3,Altima,Sentra,Versa,Jetta,Taurus,Focus&SORTER=MakeModel&SORTORDER=Ascending&BUCKETPAGE=1
優點是車很新,大約是一到二年的新車,里程數在3萬mile以下,有良好維修記錄,價錢也公道
缺點是租過車的人很多,駕駛習慣差,齒輪磨合通常不佳,買來要開3年以上可能要換零件
4. Buy new car
Case & Check
Loan
http://www.cars.com/go/search/detail.jsp?tab=finance&recnum=&actLog=&listingId=133968067&paId=556934702&listingRecNum=59&criteria=dlId%3d436457%26feedSegId%3d28705%26rpp%3d50%26isDealerGrouping%3dfalse%26requestorTrackingInfo%3dRTB_SEARCH%26sf1Nm%3dprice%26stkTypId%3d28880%26PMmt%3d1-1-0%26rn%3d50%26crSrtFlds%3dstkTypId-feedSegId-mkId-mdId%26mdId%3d21285%26stkTyp%3dN%26mkId%3d20089%26sf1Dir%3dDESC&tracktype=newcc&pageNumber=&numResultsPerPage=&largeNumResultsPerPage=0&sortorder=descending&sortfield=PRICE&certifiedOnly=false&
缺點是貸款利率要 2-5%, 兩年貸款期約要多支出600USD-1000USD
Insurance
state farm
https://www.statefarm.com/
geico
AAA
傳說 State Farm 承認台灣的無肇事記錄
 Geico 最便宜
AAA 很多人用
Still editing...
0 notes
leebart · 10 years
Link
官網規定連結 經濟艙免費行李額度
 Aegean Airlines (愛琴海航空) 1件限 20 公斤
 Aer Lingus (愛爾蘭航空) 無
 Aeroflot (俄羅斯航空) 1 件限 23 公斤;美加線:2 件各 23 公斤
 Aeromexico (墨西哥航空) 美加線:1 件限 23 公斤;亞洲線:2 件各 23 公斤
 Air Asia (亞洲航空) 無
 Air Berlin (柏林航空) 無
 Air Canada (加拿大航空) 1 件限 23 公斤
 Air China (中國國際航空) 國內線:20公斤
日本線、美國線:2 件各 23 公斤;其餘航線:1 件限 23 公斤;
 Air Europa (歐洲航空) 1 件限 23 公斤
 Air France (法國航空) 1 件限 23 公斤;美加線:2 件各 23 公斤
 Air India (印度航空) 20 公斤;美加線:2 件各 23 公斤
 Air Jamaica (牙買加航空) 2 件各 23 公斤
 Air Malta (馬爾他航空) 限 20 公斤
 Air Mauritius (模里西斯航空) 1 件限 23 公斤
 Air New Zealand (紐西蘭航空) 1 件限 23 公斤
 Alaska Airlines (阿拉斯加航空) 國內線:無;國際線:1 件限 23 公斤
 Alitalia (義大利航空) 1 件限 23 公斤;亞洲線、美加線:2 件各 23 公斤
 American Airlines (美國航空) 國內線:無;國際線:2 件各 23 公斤
 Asiana (韓亞航空) 亞洲線、歐洲線:20 公斤;美加線:2 件各 23 公斤
 Austrian Airlines (奧地利航空) 1 件限 23 公斤
 Bahamasair (巴哈馬航空) 1 件限 23 公斤
 British Airways (英國航空) 1 件限 23 公斤;非洲線、美洲線:2 件各 23 公斤
 Brussels Airlines (布魯塞爾航空) 1 件限 23 公斤;非洲線、美洲線:2 件各 23 公斤
 Bulgaria Air (保加利亞航空) 1 件限 23 公斤
 Cathay Pacific (國泰航空) 20 公斤;美加線:2 件各 23 公斤
 China Airlines (中華航空) 20 公斤;美加線:2 件各 23 公斤
 China Eastern (中國東方航空) 國內線:20 公斤;
美加線、歐洲線、紐澳線、日本線:2 件各 23 公斤
 China Southern (中國南方航空) 國內線:20 公斤;
歐洲線:1 件 23 公斤;美加線、紐澳線:2 件各 23 公斤
 Croatia Airlines (克羅埃西亞航空) 國內線:15 公斤;國際線:1 件 23 公斤
 Cubana (古巴航空) 20 公斤
 Cyprus Airways (賽浦路斯航空) 1 件限 23 公斤
 Czech Airlines (捷克航空) 1 件限 23 公斤
 Delta (達美航空) 國內線:無;日本線:1 件限 23 公斤;
歐洲線、亞洲線:2 件各 23 公斤
 easyJet (易捷航空) 無
 Egyptair (埃及航空) 2 件各 23 公斤
 El Al Airlines (以色列航空) 1 件限 23 公斤
 Emirates (阿聯酋航空) 30 公斤;美加線:2 件各 23 公斤
 Estonian Air (愛沙尼亞航空) 1 件限 23 公斤
 Ethiopian (衣索比亞航空) 23 公斤;美加線:2 件各 23 公斤
 Etihad Airways (阿提哈德航空) 30 公斤;美加線:2 件各 23 公斤
 EVA Air (長榮航空) 20 公斤;美加線:2 件各 23 公斤
 Finnair (芬蘭航空) 1 件限 23 公斤
 Flybe 20 公斤
 Gulf Air (海灣航空) 30 公斤
 Hong Kong Airlines (香港航空) 2 件總合 23 公斤
 Iberia (西班牙航空) 1 件限 23 公斤;美加線:2 件各 23 公斤
 Icelandair (冰島航空) 1 件限 23 公斤;美加線:2 件各 23 公斤
 JAL Japan Airlines (日本航空) 2 件各 23 公斤
 Jet Airways (捷特航空) 30 公斤
 Jetstar (捷星航空) 無
 Kenya Airways (肯亞航空) 國內線:20 公斤;亞洲線:40 公斤;歐洲線:2 件各 23 公斤
 Kingfisher Airways (翠鳥航空) 20 公斤
 KLM (荷蘭航空) 1 件限 23 公斤;美加線、日本線:2 件各 23 公斤
 Korean Air (大韓航空) 國內線:20 公斤;歐洲線:1 件限 23 公斤
美洲線:2 件各 23 公斤
 Kuwait Airways (科威特航空) 20 公斤
 LAN (南美航空) 國內線:23 公斤;國際線:2 件各 23 公斤
 LOT Polish Airlines (波蘭航空) 1 件限 23 公斤
 Lufthansa (德國漢莎航空) 1 件限 23 公斤;美洲線:2 件各 23 公斤
 Malaysia Airlines (馬來西亞航空) 30 公斤;美洲線:2 件各 23 公斤
 Olympic Airlines (奧林匹亞航空) 1 件限 20 公斤
 Peach Air (樂桃航空) 無
 Qantas (澳洲航空) 30 公斤;日本線:2 件各 23 公斤
 Qatar Airways (卡達航空) 30 公斤;美洲線:2 件各 23 公斤
 Royal Brunei (汶萊航空) 20 公斤
 Royal Jordanian (約旦航空) 1 件限 23 公斤;美洲線:2 件各 23 公斤
 Scandinavian (SAS) (北歐航空) 1 件限 23 公斤
 Scoot (酷航) 無
 Singapore Airlines (新加坡航空) 20 公斤;美洲線:2 件各 23 公斤
 South African (南非航空) 1 件限 23 公斤;美洲線、日本線:2 件各 23 公斤
 Sri Lankan Airlines (斯里蘭卡航空) 30 公斤;美洲線:2 件各 23 公斤
 SWISS (瑞士航空) 1 件限 23 公斤;美洲線、日本線、非洲線:2 件各 23 公斤
 TAP Portugal (葡萄牙航空) 1 件限 23 公斤;美洲線:2 件各 23 公斤
 Thai Airways (泰國航空) 20 公斤;美洲線:2 件各 23 公斤
 Tiger Airways (虎航) 無
 Turkish Airlines (土耳其航空) 20 公斤;美洲線:2 件各 23 公斤
 United Airlines (聯合航空) 國內線:無;國際線:1 件限 23 公斤
 US Airways (全美航空) 國內線:無;亞洲線:2 件各 23 公斤;歐洲線:1 件限 23 公斤
 Virgin Atlantic (維珍航空) 1 件限 23 公斤;美洲線、非洲線、印度線:2 件各 23 公斤
0 notes
leebart · 10 years
Link
數據資料截至2013年3月:
星空聯盟(28個正式成員),正式會員(*表示創始會員)
*(UA)聯合航空,*(LH)漢莎航空,*(AC)加拿大航空,*(TG)泰國國際航空,*(SK)北歐航空,(NH)全日本空輸,(NZ)紐西蘭航空,(SQ)新加坡航空,(OS)奧地利航空,(LO)波蘭航空,(OZ)韓亞航空,(US)全美航空,(JP)亞德里亞航空,(KF)藍天航空,(OU)克羅埃西亞航空,(TP)葡萄牙航空,(LX)瑞士國際航空,(SA)南非航空,(CA)中國國際航空,(MS)埃及航空,(TK)土耳其航空,(SN)布魯塞爾航空,(JJ)巴西天馬航空,(A3)愛琴海航空,(ET)衣索比亞航空,(CM)巴拿馬航空,(AV)哥倫比亞航空,(TA)中美洲航空,(ZH)深圳航空,(BR)長榮航空
天合聯盟(19個正式成員)建立於2000年
*(DL)達美航空,*(AF)法國航空,*(AM)墨西哥國際航空,*(KE)大韓航空,(OK)捷克航空,(KL)荷蘭皇家航空,(SU)俄羅斯航空,(CZ)中國南方航空,(UX)歐羅巴航空,(KQ)肯亞航空,(AZ)義大利航空,(RO)羅馬尼亞航空,(VN)越南國家航空,(MU)中國東方航空,(CI)中華航空,(SV)沙烏地阿拉伯航空,(ME)中東航空,(AR)阿根廷航空,(MF)廈門航空,
寰宇一家(13個有效成員,1個非活躍成員)建立於1999年
*(CX)國泰航空,*(AA)美國航空,*(BA)英國航空,*(QF)澳洲航空,(AY)芬蘭航空,(IB)西班牙國家航空,(LA)智利國家航空,(JL)日本航空,(RJ)皇家約旦航空,(MX)墨西哥航空(非活躍成員),(S7)西伯利亞航空,(AB)柏林航空,(MH)馬來西亞航空,(QR)卡達航空
1 note · View note
leebart · 10 years
Text
fix npm ERR! Error: SSL Error: CERT_UNTRUSTED
npm install forever -g
npm http GET https://registry.npmjs.org/forever
npm http GET https://registry.npmjs.org/forever/-/forever-0.9.2.tgz
npm ERR! failed to fetch https://registry.npmjs.org/forever/-/forever-0.9.2.tgz
npm ERR! Error: SSL Error: CERT_UNTRUSTED
npm ERR!     at ClientRequest.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/request/main.js:356:28)
npm ERR!     at ClientRequest.emit (events.js:67:17)
npm ERR!     at HTTPParser.onIncoming (http.js:1238:11)
npm ERR!     at HTTPParser.onHeadersComplete (http.js:102:31)
npm ERR!     at CleartextStream.ondata (http.js:1137:24)
npm ERR!     at CleartextStream._push (tls.js:367:27)
npm ERR!     at SecurePair.cycle (tls.js:688:20)
npm ERR!     at EncryptedStream.write (tls.js:122:13)
npm ERR!     at Socket.ondata (stream.js:38:26)
npm ERR!     at Socket.emit (events.js:67:17)
npm ERR! You may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <[email protected]>
npm ERR! 
npm ERR! System Linux 2.6.39.1-linode34
npm ERR! command "node" "/usr/local/bin/npm" "install" "forever" "-g"
npm ERR! cwd /var/www/paypal/upload/secureCheckOut
npm ERR! node -v v0.6.8
npm ERR! npm -v 1.1.0-2
npm ERR! message SSL Error: CERT_UNTRUSTED
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /var/www/paypal/upload/secureCheckOut/npm-debug.log
npm not ok
way to fix this error
1. terminal : 
npm config set ca ""
2. update your npm to latest version
0 notes
leebart · 11 years
Text
RESTful api testing tool (post/get/put/delete) Postman
https://chrome.google.com/webstore/detail/postman-rest-client
**Features** *Create requests quickly* - Compact layout - HTTP requests with file upload support - Formatted API responses for JSON and XML - Open responses as an HTML file in a new window - HATEOAS support - Image previews - Request history - Basic and OAuth 1.0 helpers - Autocomplete for URL and header values - Key/value editors for adding parameters or header values. Works for URL parameters too. - Use environment variables to easily shift between settings. Great for testing production, staging or local setups. - Use Global variables for values which are common throughout APIs - Use the quick look feature to preview variables and their values before you use them - Keyboard shortcuts to maximize your productivity
0 notes
leebart · 11 years
Text
Force refresh Chrome (MAC & PC)
MAC : Command-Shift-R
PC : Ctrl+F5 or Shift+F5
0 notes
leebart · 11 years
Link
Include basic charts like Line, Bar, Pie
And modern charts like Word cloud, Bubble, Heat
0 notes
leebart · 11 years
Text
How To : SlidingMenu Example & Library
1. import actionbarsherlock
http://actionbarsherlock.com/
2. import SlidingMenu (Example & library)
https://github.com/jfeinstein10/SlidingMenu/
3. replace SlidingMenu library's android-support-v4.jar with actionbarsherlock's
4. right click SlidingMenu example -> properties -> android
library -> remove X -> add actionbarsherlock
5. SlidingMenu Library
right click -> properties -> Java Build Path -> Projects
add actionbarsherlock
edit SlidingFragmentActivity.java
public class SlidingFragmentActivity extends SherlockFragmentActivity implements SlidingActivityBase
ps.reference:
http://boroniatechnologies.com/installing-slidingmenu-android-library-and-example/
Enjoy your Facebook like menu :)
Tumblr media
0 notes
leebart · 11 years
Text
Sqlite data base Cursor to ArrayList
arrayList = new ArrayList<Map<String,Object>>();
for(cursor.moveToFirst(); !cursor.isAfterLast(); cursor.moveToNext()) {
Map<String, Object> item = new HashMap<String,Object>();
for(int i=0; i<cursor.getColumnCount(); i++)
item.put(cursor.getColumnName(i), cursor.getString(i));
arrayList.add(item);
}
Enjoy the ArrayList with Adapters :)
0 notes
leebart · 11 years
Text
Eclipse : auto activation triggers
Eclipse -> Preferences -> Java -> Editor -> Content Assist -> Auto Activation
.abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ(,
XCode like (Visual Studio like) autocomplete functionality in Eclipse
Tumblr media
Enjoy coding
0 notes
leebart · 11 years
Text
How to : DaoGenerator
http://greendao-orm.com/
1. download gradle
http://www.gradle.org/installation
        1.1 unzip gradle & add path via export
export PATH="GRADPATH/bin:$PATH"
2. download freemarker
http://mvnrepository.com/artifact/org.freemarker/freemarker
3. compile DaoGenerator by gradle
/greenDAO-master/DaoGenerator $gradle build jar
4. import DaoExampleGenerator to eclipse
        4.1 create a lib folder
        4.2 copy freemarker.jar & greendao-generator-1.3.0.jar to lib
        4.3 right click the .jar files, add to build path
5. right click ExampleDaoGenerator.java, Run as Java Application
6. generated files in greenDAO-master/DaoExample/src-gen/de/greenrobot/daoexample folder
enjoy it :)
0 notes
leebart · 11 years
Link
fmdb - A Cocoa / Objective-C wrapper around SQLite
[db executeUpdate:@"INSERT INTO user (name, description) VALUES (?,?)", name, description]
0 notes