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
@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
@nrollr
nrollr / MySQL_macOS_Sierra.md
Last active Oct 16, 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 :

@ricardozea
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
==================
@devinrhode2
devinrhode2 / clean-scrollbar.css
Created May 2, 2012
Like, basically PERFECT scrollbars
View clean-scrollbar.css
/**
* Like, basically PERFECT scrollbars
*/
/*
It's pure CSS.
Since a quick google search will confirm people going crazy about Mac OS Lion scrollbars...
this has no fade-out effect.
In Mac OS Lion, the lowest common denominator is always showing scrollbars by a setting.
@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
View gist:527683
// ----------------------------------------------------------
// A short snippet for detecting versions of IE in JavaScript
// without resorting to user-agent sniffing
// ----------------------------------------------------------
// If you're not in IE (or IE version is less than 5) then:
// ie === undefined
// If you're in IE (>=5) then you can determine which version:
// ie === 7; // IE7
// Thus, to detect IE:
// if (ie) {}
@kelly-apollo
kelly-apollo / .eshintrc
Created Sep 5, 2015
个人偏好的eslint配置,带中文注释
View .eshintrc
# 建议:官方文档对每个规则有简单易懂的例子说明,有时间的同学可以查阅一遍。
# 官方文档 http://eslint.org/docs/rules/
extends: 'eslint:recommended'
# 规则按照首字母在字母表升序排序
rules:
# 单行代码块大括号后需要一个空格
block-spacing: 2
@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 版。

@micmcg
micmcg / gist:976172
Created May 17, 2011
Markdown cheat sheet
View gist:976172

Header 1

Header 2

Header 3 ### (Hashes on right are optional)

Header 4

Header 5

Markdown plus h2 with a custom ID ## {#id-goes-here}

Link back to H2

This is a paragraph, which is text surrounded by whitespace. Paragraphs can be on one

@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')
You can’t perform that action at this time.