Skip to content

Instantly share code, notes, and snippets.

View zhangtemplar's full-sized avatar

Qiang Zhang zhangtemplar

View GitHub Profile
@zhangtemplar
zhangtemplar / Dockerfile
Last active October 26, 2017 05:49 — forked from tribou/Dockerfile
FROM node
MAINTAINER zhangtemplar
# Prepare app directory
RUN mkdir -p /usr/src/app
ADD . /usr/src/app
# Install dependencies
WORKDIR /usr/src/app
RUN npm install
@zhangtemplar
zhangtemplar / mysql2sqlite.sh
Last active August 21, 2017 01:46 — forked from esperlu/mysql2sqlite.sh
MySQL to Sqlite converter
#!/bin/sh
# Converts a mysqldump file into a Sqlite 3 compatible file. It also extracts the MySQL `KEY xxxxx` from the
# CREATE block and create them in separate commands _after_ all the INSERTs.
# Awk is choosen because it's fast and portable. You can use gawk, original awk or even the lightning fast mawk.
# The mysqldump file is traversed only once.
# Usage: $ ./mysql2sqlite mysqldump.sql | sqlite3 database.sqlite