跳到主要內容

發表文章

目前顯示的是 10月, 2014的文章

AWS PHP SDK for New Region eu-central-1

其實在 AWS 對外正式 announce 這個 region 之前, 我們已經有先接到了通知,並且要事先準備好 patch 來支援這個新的 region. 因為覺得很有趣,所以在看到 AWS 正式對外的 announce 後 發現裡面提到新的 region 只支援 "v4" 的 signature, 而我們用的 AWS PHP SDK 版本似乎過舊,所以認證都會失敗... 當晚馬上在測試環境更換2.7.1後,認證過了 可是卻出現 invalid endpoint 之類的錯誤訊息. 原來在 2.7.2 之前, 所有的 endpoint 都是內建在 SDK 的 resource file 裡面 所以即使 AWS 對外 announce 了新的 endpoint , 還是需要上 patch 幫 SDK 加新的 endpoint 隔天睡醒後,同事看到有更新的 2.7.2  而且發現 不需要手動 patch 加 endpoint 就可以 access 新的 eu-central-1 region 看了一下發現原來 2.7.2  以後 SDK 會自動去抓 AWS 最新的 Region & Edpoint List 所以以後有新的 region announce 的話, 就不用再去 patch AWS PHP SDK 啦~

PHP-CS-Fixer

我一直覺得我有個強迫症 要開始修 bug 或者 trace code  之前都要先把  code reindent 一遍... 用了 php-cs-fixer 去做 PSR2 的 auto indent 後, 發現 comma後的空白和 function call 參數的 comma 的分隔不會被修正.. 於是一邊看code又會一邊手賤的加 space... 加到後來就會從從頭到尾加一遍...然後忘記看 code 了..lol... 覺得這樣下去不行,於是送了生平的第一個給 open source project 的 pull request... 希望可以被 merge ...lol... Fix Spaces in method arguments and array values #119

NEXUS 5 D820 CHT LTE Support

中華電信 4G 1800 Band 3 Support North America (D820) Nexus 5 model: LTE: Bands: 1/2/4/5/17/19/25/26/41 Outside North America (D821) Nexus 5 model: LTE: Bands: 1/3/5/7/8/20 台灣 4G(LTE) 頻段 (一) 700 MHz 頻段:  (Band 28) (二) 900 MHz 頻段:  (Band 8) (三) 1800 MHz 頻段:(Band 3) <quote  asianyangman > 3.跑原PO文章的流程從這裡開始 ,手機接上電腦後確定USB Debugging有打勾,MTP跟PTP有取消,開 cmd 並 cd 到開發者工具的 platform tools 目錄,接下來先發 adb devices確定有偵測到手機,接下來再發命令          adb shell    su    setprop sys.usb.config diag,adb 有看到在跑安裝驅動或聽到B聲後,點開裝置管理員(Device Manager),確定有找到LG AndroidNet USB Serial Port(COMXX),COM值無所謂 4.打開 QPST Configuration 選好PORTS 後按add a new port,再來選擇剛剛看到的LG PORT,並輸入COM口在右邊,最後按下OK 5.獲取SPC碼,首先安裝NEXUS5 field test mode,並開啟 cmd 並一樣 cd 到platform-tools的目錄底下,打adb devices確定有連接上後,打adb logcat,等他跑差不多停後,手機打開NEXUS5 field test mode點選右上角的setting--->Setting(view)--->LTE--->Edit,接著停留在此畫面, 並輔以這兩篇文章裡的圖片 http://goo.gl/WYK9I8   &   http://goo.gl/fxOpMF 找到自己的SPC碼 6.開啟QXDM,在view那裡打開NV Br

Spotify Global Hot Key in OSX with Automator Script

Quote from -- modacular Open up the  Automator Application  (Applications/Automator.app)  Create a  new document ( ⌘N)  and choose the  "Service"  type for your document. On the  "Service receives selected"  item in the top side of the window select  "no input"  from the dropdown. Search for  "Run Applescript"  from the searchbar on the left side of the window. Drag  the "Run Applescript" item in the  main window area . Delete  the  (* Your script goes here *)  line and paste this instead: tell  application  "Spotify"  to p laypause Save  your script (File > Save or ⌘S) and give it a meaningful name like Spotify PlayPause :D Go to  System Preferences > Keyboard > Shortcuts  and select  Services  from the left column. Scroll down to the  General  Section and find your  Spotify PlayPause  item. Click the  add shortcut  button and press the combination of keys that will be your shortcut. (eg. I gave it the