Skip to content

Instantly share code, notes, and snippets.


Justin Chen interjc

Block or report user

Report or block interjc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
nrollr /
Last active Nov 7, 2019
Install MySQL on Sierra using Homebrew

Install MySQL on macOS Sierra

This procedure explains how to install MySQL using Homebrew on macOS Sierra 10.12

Install Homebrew

  • Installing Homebrew is effortless, open Terminal and enter :
    $ /usr/bin/ruby -e "$(curl -fsSL"
  • Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.

Install MySQL

At this time of writing, Homebrew has MySQL version 5.7.15 as default formulae in its main repository :

spalladino /
Created Dec 22, 2015
Backup and restore a mysql database from a running Docker mysql container
# Backup
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql
# Restore
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE
kelly-apollo / .eshintrc
Created Sep 5, 2015
View .eshintrc
# 建议:官方文档对每个规则有简单易懂的例子说明,有时间的同学可以查阅一遍。
# 官方文档
extends: 'eslint:recommended'
# 规则按照首字母在字母表升序排序
# 单行代码块大括号后需要一个空格
block-spacing: 2
alyssaq / gulpfile.js
Last active Mar 1, 2019
browserify, babel, gulp, glob, vinyl-source-stream, uglify
View gulpfile.js
npm install gulp gulp-load-plugins gulp-uglify
npm install browserify babelify glob vinyl-source-stream vinyl-buffer
More examples:
var gulp = require('gulp')
var $ = require('gulp-load-plugins')()
var browserify = require('browserify')
indieisaconcept / gist:936dbf33cfc844d87968
Last active Mar 25, 2017
browserify + watchify + viny-transform + multiple bundles
View gist:936dbf33cfc844d87968
// this setup assumes you are using gulp-config for file.src & file.dest
// but can be adapted to vanilla easily.
'use strict';
var transform = require('vinyl-transform'),
browserify = require('browserify'),
watchify = require('watchify'),
// consider using gulp-load-plugins
debrice /
Last active Nov 6, 2019
Simple Website Crawler (in python)

Simple Website Crawler

The following gist is an extract of the article Building a simple crawler. It allows crawling from a URL and for a given number of bounce.

Basic Usage

from crawler import Crawler
crawler = Crawler()
# displays the urls
asika32764 /
Last active Jun 1, 2018
Using this command to create a symbol link to mysql.sock in Mac
sudo ln -s /Applications/XAMPP/xamppfiles/var/mysql/mysql.sock /var/mysql/mysql.sock
sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /var/mysql/mysql.sock
sudo ln -s /Applications/AMPPS/mysql/tmp/mysql.sock /var/mysql/mysql.sock
messense /
Last active Jul 17, 2019
shadowsocks on openwrt

配置 shadowsocks

架设好 shadowsocks 服务端,在路由器上安装 shadowsocks 客户端,并配置 /etc/config/shadowsocks.json ,假设本地监听端口为 1080 。启动 shadowsocks

/etc/init.d/shadowsocks start

配置 privoxy

安装 privoxy openwrt 版。

ricardozea / ie67891011-css-hacks.txt
Last active Oct 16, 2019
IE CSS hacks - IE6, 7, 8, 9, 10, 11
View ie67891011-css-hacks.txt
IE6 Only
_selector {...}
IE6 & IE7
*html or { _property: }
IE7 Only
leandropincini / gist:4384452
Last active May 11, 2016
How to install Apache Tomcat on Mac OSX Montain Lion 10.8.2
View gist:4384452
Download and unzip the tar.gz:
sudo mkdir /usr/local
sudo mv ~/Downloads/apache-tomcat-7.0.* /usr/local
sudo ln -s /usr/local/apache-tomcat-7.0.* /Library/Tomcat
sudo chown -R <your OSX username> /Library/Tomcat
sudo chmod +x /Library/Tomcat/apache-tomcat-7.0.*/bin/*.sh
You can’t perform that action at this time.