Skip to content

Instantly share code, notes, and snippets.

@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

Moved to git repository: https://github.com/denji/nginx-tuning

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.

.
.
.
.
.
@clonn
clonn / index.js
Last active February 22, 2017 06:24
test for node v7.6.0
var request = require('superagent');
async function getRequest() {
let body = await request('http://www.google.com');
return body;
}
async function run() {
let result = await getRequest();
console.log(result.text);
@clonn
clonn / study_nvm.md
Last active July 29, 2018 13:59
node_nvm_for_windows