Skip to content

Instantly share code, notes, and snippets.

View tworzenieweb's full-sized avatar

Łukasz Adamczewski tworzenieweb

View GitHub Profile
#!/usr/bin/env sh
set -e
# Usage:
# export CI_API_TOKEN=<YOUR_TOKEN with api scope from https://gitlab.com/profile/personal_access_tokens>
# export CI_API_V4_URL=https://gitlab.com/api/v4
# export CI_PROJECT_ID=37
#
# ./deployment/bin/stop-all-dev-environments
@tworzenieweb
tworzenieweb / mysql2sqlite.sh
Created April 4, 2017 10:33 — 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-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite