This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var isOn = true; | |
var commands = { | |
off: [3.3,1.6,0.4,0.4,0.4,0.4,0.4,1.2,0.4,0.4,0.4,1.2,0.4,0.4,0.4,0.4,0.4,0.4,0.4,1.2,0.4,1.2,0.4,0.4,0.4,0.4,0.4,0.4,0.4,1.2,0.4,1.2,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,1.2,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,1.2,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,1.2,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4], | |
on: [3.3,1.6,0.4,0.4,0.4,0.4,0.4,1.2,0.4,0.4,0.4,1.2,0.4,0.4,0.4,0.4,0.4,0.4,0.4,1.2,0.4,1.2,0.4,0.4,0.4,0.4,0.4,0.4,0.4,1.2,0.4,1.2,0.4,0.4,0.4,0.4,0.5,0.3,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,1.2,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,1.2,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,1.2,0.4,1.2,0.4,1.2,0.4,1.2,0.4,1.2,0.4,1.2,0.4,0.4,0.4,0.4,0.4,0.4,0.4,1.2,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,1.2,0.4,1.2,0.4,0.4,0.4,0.4,0.4,1.2,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,0.4,1.2,0.4,1.2,0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am alanho on github. | |
* I am alanho (https://keybase.io/alanho) on keybase. | |
* I have a public key whose fingerprint is 83EE B426 639B AF7F 1538 24FE 48D2 B7F8 7429 5A5A | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for f in *; do mv -- "$f" "$(stat -f "%Sm" -t "%Y%m%d%H%M%S" $f)"; done | |
for f in *; do mv -- "$f" "`stat -f "%Sm" -t "%Y%m%d%H%M%S" $f`.jpg"; done | |
ffmpeg -framerate 1 -pattern_type glob -i '*.jpg' -c:v libx264 out.mp4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
heroku logs --tail > log/production.log | |
cat log/production.log | cut -c 46- | grep 'Oink\|Memory\|Instantiation' > log/production-oink.log | |
oink --threshold=0 log/production-oink.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Note: | |
HK1980: SRID 2326 http://spatialreference.org/ref/epsg/hong-kong-1980-grid-system/ | |
WGS84: SRID 4326 | |
Example: | |
Journey time indicators by Transport Department | |
https://data.gov.hk/en-data/dataset/hk-td-tis-journey-time-indicators | |
Location: H1 – JTI at Gloucester Road eastbound near the Revenue Tower (835776.133E, 815604.834N) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://www.icloud.com/keynote/AwBUCAESEE3_Xqz0tbA0jEc5sy8V4oEaKW-PqSEmX8cjtD9nZwWP680GhmKNunoK2ZsU52EMqSz9nh9bLF10UVjjMCUCAQEEIA_qp0vuF9500cZXmhypAXWMII1KhFWLWA7hOyYI6KBJ#Barcamp_2014_Sharing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PKG_CONFIG_PATH="/opt/local/lib/pkgconfig:/usr/local/Cellar/imagemagick/6.8.9-1/lib/pkgconfig:$PKG_CONFIG_PATH" C_INCLUDE_PATH=/usr/local/Cellar/imagemagick/6.8.9-1/include/ImageMagick-6 gem install rmagick | |
gem install pg -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/9.3/bin/pg_config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Coordinates.php | |
* An utility for converting HK80 to WGS84 coordinates | |
* | |
* Copyright (C) 2010, 2013 Kelvin Wong | |
* Licensed under the MIT License (http://opensource.org/licenses/MIT) | |
* | |
* Note: For the glossaries and conventions for coordinates convertion, please refer to | |
* the website of Geodetic Survey of Hong Kong. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "nokogiri" | |
require "open-uri" | |
require "uri" | |
urls = [ | |
"http://www.legco.gov.hk/general/chinese/counmtg/yr08-12/mtg_0809.htm", | |
"http://www.legco.gov.hk/general/chinese/counmtg/yr08-12/mtg_0910.htm", | |
"http://www.legco.gov.hk/general/chinese/counmtg/yr08-12/mtg_1011.htm", | |
"http://www.legco.gov.hk/general/chinese/counmtg/yr08-12/mtg_1112.htm", | |
"http://www.legco.gov.hk/general/chinese/counmtg/yr12-16/mtg_1213.htm" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ServerName www.example.com:80 | |
DocumentRoot "/path/to/rails/app/public" | |
RewriteEngine On | |
<Proxy balancer://railsapp> | |
BalancerMember http://127.0.0.1:5000 | |
BalancerMember http://127.0.0.1:5001 | |
</Proxy> |
NewerOlder