Skip to content

Instantly share code, notes, and snippets.

@clonn
clonn / remove_complete_mariaDB.sh
Last active May 21, 2021 14:59
remove complete mariaDB in ubuntu 14.04
sudo apt-get remove mariadb-server
sudo apt-get remove --auto-remove mariadb-server
sudo apt-get purge mariadb-server
sudo apt-get purge --auto-remove mariadb-server
@clonn
clonn / 01-README.md
Created September 18, 2016 06:52 — forked from petemcw/01-README.md
Mac OS X LEMP Configuration

Mac OS X LEMP Configuration

This Gist is a collection of configuration files that can be used to easily setup a Homebrew-based LEMP stack on Mac OS X.

Files in this repository are numbered and named for ordering purposes only. At the top of each file is a section of metadata that denote what component the file belongs to and the default name & location of the file. Feel free to implement it however you want.

Note: some configuration files have hard-coded paths to my user directory -- fix it for your setup

Setup

@clonn
clonn / index.html
Last active October 22, 2016 08:43
webpack init config
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<h1>Hello Webpack</h1>
<script src="bundle.js"></script>
</body>
@clonn
clonn / study_nvm.md
Last active July 29, 2018 13:59
node_nvm_for_windows
@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 / 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 / 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 / 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 / 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 / README.md
Created April 19, 2018 16:12
Sequelize + Express + Migrations + Seed Starter