Skip to content

Instantly share code, notes, and snippets.

😂
Learning

Justin Chen interjc

😂
Learning
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
nrollr / MySQL_macOS_Sierra.md
Last active Sep 20, 2019
Install MySQL on Sierra using Homebrew
View MySQL_macOS_Sierra.md

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 https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • 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
spalladino / mysql-docker.sh
Created Dec 22, 2015
Backup and restore a mysql database from a running Docker mysql container
View mysql-docker.sh
# 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
kelly-apollo / .eshintrc
Created Sep 5, 2015
个人偏好的eslint配置,带中文注释
View .eshintrc
# 建议:官方文档对每个规则有简单易懂的例子说明,有时间的同学可以查阅一遍。
# 官方文档 http://eslint.org/docs/rules/
extends: 'eslint:recommended'
# 规则按照首字母在字母表升序排序
rules:
# 单行代码块大括号后需要一个空格
block-spacing: 2
@alyssaq
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: https://github.com/gulpjs/gulp/tree/master/docs/recipes
*/
var gulp = require('gulp')
var $ = require('gulp-load-plugins')()
var browserify = require('browserify')
@indieisaconcept
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
debrice / crawler.md
Last active Sep 19, 2019
Simple Website Crawler (in python)
View crawler.md

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()
crawler.crawl('http://techcrunch.com/')
# displays the urls
@asika32764
asika32764 / mysql.sock.sh
Last active Jun 1, 2018
Using this command to create a symbol link to mysql.sock in Mac
View mysql.sock.sh
# XAMPP
sudo ln -s /Applications/XAMPP/xamppfiles/var/mysql/mysql.sock /var/mysql/mysql.sock
# MAMP
sudo ln -s /Applications/MAMP/tmp/mysql/mysql.sock /var/mysql/mysql.sock
# AMPPS
sudo ln -s /Applications/AMPPS/mysql/tmp/mysql.sock /var/mysql/mysql.sock
@messense
messense / shadowsocks-on-openwrt.md
Last active Jul 17, 2019
shadowsocks on openwrt
View shadowsocks-on-openwrt.md

配置 shadowsocks

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

/etc/init.d/shadowsocks start

配置 privoxy

安装 privoxy openwrt 版。

@ricardozea
ricardozea / ie67891011-css-hacks.txt
Last active Apr 24, 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
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:
http://tomcat.apache.org/download-70.cgi
install:
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.