Skip to content

Instantly share code, notes, and snippets.

View ronnywang's full-sized avatar

Ronny Wang ronnywang

  • https://ronny.tw/
  • Taiwan
View GitHub Profile
@ronnywang
ronnywang / gist:9018851
Created February 15, 2014 12:43
如何濾掉聊天室的操作對話
在 Chrome 下面
在網址列手動輸入 javascript: (必需要手動輸入,因為 chrome 在複製貼上會濾掉 javascript: )
然後複製貼上
setInterval(function(){$('#chat_line_list li').each(function(){ var a = $(this); var t=$.trim(a.text().split(':')[1]); if (t == 'up' || t == 'down' || t == 'left' || t == 'right' || t == 'a' || t == 'b' || t == 'start') { a.hide(); }})}, 500)
接下來你就會發現聊天室內上下左右對話都不見了
public static function getRandomName()
{
$areas = array('taipei', 'taoyuan', 'hsinchu', 'yilan', 'hualien', 'miaoli', 'taichung', 'changhua', 'nantou', 'chiayi', 'yunlin', 'tainan', 'penghu', 'kaohiung', 'pingtung', 'kinmen', 'matsu', 'taitung');
$first_names = array('An', 'Chang', 'Chao', 'Chen', 'Cheng', 'Chi', 'Chiang', 'Chien', 'Chin', 'Chou', 'Chu', 'Fan', 'Fang', 'Fei', 'Feng', 'Fu', 'Han', 'Hao', 'Ho', 'Hsi', 'Hsiao', 'Hsieh', 'Hsu', 'Hsueh', 'Hua', 'Huang', 'Jen', 'Kang', 'Ko', 'Ku', 'Kung', 'Lang', 'Lei', 'Li', 'Lien', 'Liu', 'Lo', 'Lu', 'Ma', 'Meng', 'Miao', 'Mu', 'Ni', 'Pai', 'Pan', 'Pao', 'Peng', 'Pi', 'Pien', 'Ping', 'Pu', 'Shen', 'Shih', 'Shui', 'Su', 'Sun', 'Tang', 'Tao', 'Teng', 'Tou', 'Tsao', 'Tsen', 'Tsou', 'Wang', 'Wei', 'Wu', 'Yang', 'Yen', 'Yin', 'Yu', 'Yuan', 'Yueh', 'Yun');
for ($i = 0; $i < 10; $i ++) {
$random = strtolower($areas[rand(0, count($areas) - 1)] . '-' . $first_names[rand(0, count($first_names) - 1)] . '-' . rand(100000, 1000000)
@ronnywang
ronnywang / gist:9fca88f817b2cbb26c0f
Created April 2, 2015 10:24
這兩個是不同字...
decodeURIComponent('%EF%A7%A9+%E9%87%8C')
> "里+里"
@ronnywang
ronnywang / gist:e79fb48512507de0a8a1
Created April 20, 2015 16:51
2015/4/1 - 2015/4/20 小當家聊天室 bigram 分析
2015401
{"<3":2612," ":1076,"知道":976,"乃哥":952,"李嚴":907,"當家":814,"RR":814,"..":783,"幹 ":754,"小當":742,"!!":715," <":707,"你又":668,"嘟嘟":665,"又知":657,"道了":589,"ㄤㄤ":574,"~~":571,"雷恩":557,"B嘴":552,"料理":538,"怎麼":520,"ED":515,"LE":504,"醬汁":498,"紹安":497,"不要":481," 幹":478,"所以":466,"le":460,"0":460,"不是":451,"1":445,"了 ":430,"bl":429,"出來":427,"向恩":414,"還是":410,"什麼":405,"mp":401,"這樣":397,"hu":396,"ib":395,"um":395,"Th":390,"Bi":389,"eT":384,"%%":379,"魚片":377,"銅牌":377,"生魚":369,"閉嘴":368,"XD":366,"不錄":360,"ww":359,"來的":355,"錄了":353,"\/\/":353,"2":352,"礦物":351,"物質":350,"大麻":344,"小時":344," B":336," 你":335,"四郎":330,"是你":328,"阿飛":320,"ht":320,"tt":318,"tp":316,":\/":316,"0勝":308,"就是":304," 我":301,"1小":299,"可以":298,"3":294,"你的":293,"你不":292,"??":288,"王福":287,"ㄋㄟ":282,"魯夫":282,".c":281,"的料":280,":幹":278,"沒有":277,"RQ":277,"這個":275,"阿貝":267,"ㄟㄋ":263,"的,":261,"幹":256,"co":255,"om":255,"你還":252,"來了":249,"最後":248,"GD":246}
2015402
{"<3":2599," ":1496,"RR":1309,"嘟嘟":1086,"幹 ":1054,"當家":1038,"小當":949,"王福":947,"~~":918,"!!":907,"ED":849,
@ronnywang
ronnywang / gist:6feee36aae1dc74b76b1
Last active August 29, 2015 14:21
大都會客運 41 號
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ronnywang
ronnywang / gist:a80527450601212e23c7
Created May 12, 2015 10:13
大都會客運260區 (routeId=10824)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ronnywang
ronnywang / gist:7b235279d3aeafffde5e
Created May 12, 2015 10:20
大都會客運紅5 (routeId=10821)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ronnywang
ronnywang / distance_20150515.csv
Last active August 29, 2015 14:21
公車站點偏移路線
stopId routeId distance
29212 10824 888.571806532134
29211 10824 888.571806532134
59153 10824 759.904527552524
150910 10824 759.904527552524
39115 10824 743.943650131225
150911 10824 743.943650131225
152726 10824 686.816957791984
152724 10824 686.816957791984
152727 10824 654.013620102136
@ronnywang
ronnywang / code.php
Last active August 29, 2015 14:23
無燒燙傷病房的有急診醫院
<?php
$sql = "SELECT * FROM this WHERE 病床名稱 = '燒傷病床' AND (City = '臺北市' OR City = '桃園市' OR City = '新北市')";
$url = 'https://sheethub.com/clementtang/醫事機構病床類別與床數資料?sql=' . urlencode($sql) . '&format=array_json';
$hospitals = json_decode(file_get_contents($url));
$skip = array();
foreach ($hospitals as $h) {
$skip["{$h->City},{$h->Area},{$h->Name},{$h->Zone}"] = true;
}
This file has been truncated, but you can view the full file.
173772101,20111201-1,660836,pic,http://justforsale.pixnet.net/album/photo/173772101,http://justforsale.pixnet.net/album/photo/173772101,http://pic.pimg.tw/justforsale/1334560563-1851169439_t.jpg,1334560566,527,justforsale,justforsale,http://s3.pimg.tw/avatar/justforsale/0/0/resize/90x0.png?v=,http://justforsale.pixnet.net,Point,121.54933333333,25.043722222222,"Camera:HTC - Desire HD|ISOSpeedRatings:411|DateTaken:2011:12:01 19:03:42|FocalLength:4 mm|Latitude:25.043722222222|Longitude:121.54933333333",,,1322737422,http://pic.pimg.tw/justforsale/1334560563-1851169439.jpg,http://pic.pimg.tw/justforsale/1334560563-1851169439_n.jpg,http://pic.pimg.tw/justforsale/1334560563-1851169439_s.jpg,http://pic.pimg.tw/justforsale/1334560563-1851169439_q.jpg,http://pic.pimg.tw/justforsale/1334560563-1851169439_m.jpg,http://pic.pimg.tw/justforsale/1334560563-1851169439_b.jpg,http://pic.pimg.tw/justforsale/1334560563-1851169439_l.jpg,original:1952x3264|thumb:90x90|small_square:120x120|square:170x170|medium:269x450|bigger:478x80