Skip to content

Instantly share code, notes, and snippets.

@clonn
clonn / mac_homebrew_install.sh
Last active January 1, 2022 02:59
new mac install homebrew
brew install wget
brew install curl
brew install git
nvm install v12.18.0
nvm install v14.17.0

台灣地址解析

此篇紀錄處理門牌地址格式過程遇到的一些問題。

字串解析

地址-WIKI解說,台灣地址大致由下列部分組成

縣市_行政區_街道名稱_門牌編號

>EX: 台中市_中區_台灣大道1段_1號

@clonn
clonn / admin.css
Created November 30, 2018 03:18
css for admin
/* line 76, ../sass/_wrapper.scss */
#control-menu {
font-size: 15px;
max-width: 160px;
}
/* line 79, ../sass/_wrapper.scss */
#control-menu a.control-menu-top {
display: block;
font-size: 17px;
background: #00cbbb;
@clonn
clonn / nginx-tuning.md
Created July 16, 2018 03:13 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@clonn
clonn / README.md
Created April 19, 2018 16:12
Sequelize + Express + Migrations + Seed Starter
@clonn
clonn / README.md
Created April 19, 2018 16:12
Sequelize + Express + Migrations + Seed Starter
@clonn
clonn / scapeCostco.js
Created October 16, 2017 10:29
擷取 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();
@clonn
clonn / chatbot_ecommerce_2017
Created August 14, 2017 20:29
Chatbot與電子商務結合實戰 - iThome Workshop (8/19)
Chatbot 入門課程教學
很高興能夠與大家見面,在活動一開始希望大家先開通一些服務,
* [Github](https://github.com/)
下載軟體
* [node.js v8.3.0](https://nodejs.org/en/)
@clonn
clonn / CSS3 Media Queries Template
Created March 30, 2017 18:57
CSS3 Media Queries template
/*
* Author: http://stuffandnonsense.co.uk/blog/about/hardboiled_css3_media_queries/
*/
/* Smartphones (portrait and landscape) ----------- */
@media only screen
and (min-device-width : 320px)
and (max-device-width : 480px) {
/* Styles */
}
@clonn
clonn / interview_f2e.md
Last active March 2, 2017 10:16
javascript and front end test

Engineer questionare

Try to explain, what is this in JavaScript.

.
.
.
.
.