Skip to content

Instantly share code, notes, and snippets.

View interjc's full-sized avatar
😂
Learning

Justin Chen interjc

😂
Learning
View GitHub Profile
@interjc
interjc / localstorage-fault.html
Created July 24, 2012 04:24 — forked from sofish/localstorage-fault.html
localstorage 不能直接包
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>LocalStorage fault</title>
<link rel="stylesheet" href="http://typo.sofish.de/typo.css" />
</head>
<body class="typo" style="width:800px;margin:30px auto;">
<h3># error message</h3>
@interjc
interjc / gulpfile.js
Created October 16, 2015 03:40 — forked from alyssaq/gulpfile.js
browserify, babel, gulp, glob, vinyl-source-stream, uglify
/*
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')
@interjc
interjc / 0_reuse_code.js
Created January 20, 2016 02:16
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@interjc
interjc / mysql-docker.sh
Created April 18, 2017 13:50 — forked from spalladino/mysql-docker.sh
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
@interjc
interjc / app.js
Created February 26, 2020 09:00 — forked from jeffijoe/app.js
Streaming uploads through Koa.
import Koa from 'koa'
import parse from './busboy'
import AWS from 'aws-sdk'
const app = new Koa()
const s3 = new AWS.S3({
params: { Bucket: 'myBucket' }
})