本棒會在指定 FB 粉絲頁或打卡點,其按讚數量與打卡數總和超過指定數量時,放出慶祝特效。
這是當初為了五倍紅寶石說明會做出來的東西,此外也被用在 I'M Waffle 現烤鬆餅,為了可以重複利用,特此放到了 Github Page,並且改版為可透過網址變數去設定頁面內容。
右手寫程式,左手寫音樂
本棒會在指定 FB 粉絲頁或打卡點,其按讚數量與打卡數總和超過指定數量時,放出慶祝特效。
這是當初為了五倍紅寶石說明會做出來的東西,此外也被用在 I'M Waffle 現烤鬆餅,為了可以重複利用,特此放到了 Github Page,並且改版為可透過網址變數去設定頁面內容。
上次參加了 Ruby Tuesday #29,由 Ruby 圈的 JoJo,Joseph Ku(范范范瑋琪的概念),分享 WWDC 參加心得與 Swift 的簡介。
其中 Swift 的問號用法(Optional Chaining)引起了我的好奇:
if let johnsStreet =...
繼續閱讀
以下這段程式碼的功能即是在自己河道上只要聽到有人發新噗,立即回應一模一樣的內容給噗主。
require 'tjplurk'
api = Tjplurk::API.new CONSUMER_KEY, CONSUMER_SECRET, TOKEN_KEY, TOKEN_SECRET...
繼續閱讀
靈感是受到凱薩密碼的影響,且英文論壇中為了避免髒話或敏感詞彙被擋,有 rot13 的出現(其實就是凱薩加密,key 設定成 13,所以 rot13 兩次會等於原來的句子)。想說中文也可這樣玩,所以決定寫一個全世界最沒用的玩具。
gem install tj_caesar_cipher...
繼續閱讀
終於也等到了 Ruby 2.0 RC 釋出的消息,看來正式版本也不遠了。而 Ruby 2.0 是什麼?又到底都參了啥好處?這裡整理一些我的筆記。
首先 Ruby 2.0 完全向下兼容,這是個好消息,意味之著你不用更改你的程式碼便可以從任何版本無痛升級 2.0(python 迷表示羨慕?)...
繼續閱讀
TJMarkdownPaste is a Markdown bloggin service with Tex mathematical syntax and automatic code highlight...
繼續閱讀We engineers always hate repeating doing the same thing.
Take me for instance, everytime I create a new rails project, I edit GemFile
to install lots of useful gems such as devise
, carrierwave
, etc, and then download Twitter Bootstrap with newest version, extract it into vendor/assets/images
, vendor/assets/javascripts
and vendor/assets/stylesheets
, finally, replace ../img/xxx.png
into xxx.png
in bootstrap.css
and bootstrap.min.css
.
My template does two things:
Automatically install the following gems:
Download Twitter Boostrap with the newest version, and correspondingly extract files into vendor/assets/
rails new myapp -m=https://raw.github.com/gist/4010690
Alternatively, if you encounter some SSL problem during the previous command, please download the file directly and run:
rails new myapp -m=filename
繼續閱讀