Use Open_jtalk on Ubuntu 14.04
Open Jtalk 是一套可以把日文文字用電腦唸出來的軟體工具(Japanese text-to-speech system)
官網上並沒有文件說明要如何安裝,所以只得自己研究
Express Unless Package Must Use New RegExp()
最近使用了 express-unless 這套 package,發現 path 不管怎麼設定都不對
後來發現一定得用 new RegExp(); 來帶入 path,不然會沒辦法被認為是正確的
追到 lib/index.js 裡面的一行
1
|
|
因為這邊 p instanceof RegExp 如果使使用一般的 string expression 就不會通過 (ex. ‘/\/path/g’)
Package Study - Passport-jwt
先查看 index.js 會輸出兩個模組,
其中 Strategy 需要實作 passport-strategy 的 authenticate 方法
1 2 3 4 |
|
在 authenticate 的部分
JwtStrategy.JwtVerifier 其實是引入 verify_jwt.js 這隻檔案的模組 事實上 verify_jwt 背後只是用 jsonwebtoken 這個 package 來做 verify 而已
1 2 3 4 5 6 7 8 9 10 11 12 13 |
|
在實際使用的時候發現 self.fail 不會呼叫 passport verify 的 callback,需要改成 self.error
因此我發了一筆 issues 在 gituhb 上 https://github.com/themikenicholson/passport-jwt/issues/56
How to Set Android System Date by Adb Command?
Default SET format is “MMDDhhmm[[CC]YY][.ss]”, that’s (2 digits each) month, day, hour (0-23), and minute. Optionally century, year, and second.
Example
1 2 3 4 5 6 7 8 9 10 |
|
Laravel Theme Survey - How Style and Scripts Register and Render?
Introduction
最近因為要在專案動態套用不同 Theme,所以研究了一下 Laravel Theme 大致上如何運作,基本上只研究了包含 Scripts, Styles 的部分,其他 Widget, Breadcumb 則因為沒用到所以沒有研究。
Hack Into Summernote - Implmenet Image Alt and Title Feature
Introduction
Summernote is an open source WYSIWYG editor like tinymce or ckeditor. I like it because it already implements almost the necessary features. However, it lacks of function to add ‘alt’ & ‘title’ attributes, which are important to SEO, on image elements. This articles is to tell you how to hack into summernote and implement this feature by yourself.
What I Have Learned From JSConf Topic What the Heck Is the Event Loop Anyway
觀看 Youtube 上 JSConf 的影片稍微整理了一下筆記
這個影片的內容簡單的介紹了 Javascript 運作的方法
但我覺得還是沒講到很深的 event loop 到底是什麼…
Android Animation
Android 主要有兩種 Animation System,這篇文章專注在介紹較新的 Property Animation
Overview
Android framework provides two animation systems: property animation (introduced in Android 3.0) and view animation.
建立自己的第一個 Github Page
研究了主要兩種 Solution, 第一種是 jekyll 另外一種是基於 jekyll 的框架 Octpress。
兩者架起來都不難,但是 jekyll 的初始版本比較陽春,octpress 則會先包好一些第三方的套件 (尤其是社交以及追蹤分析的部分)