Skip to content

Instantly share code, notes, and snippets.

#!/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
@hardaker
hardaker / pcre2el.el
Created February 21, 2012 18:59
Quick and dirty conversion from PCRE to Elisp regexps
;;
;; pcre2el.el -- quick and dirty conversion from PCRE-style regexps to
;; Emacs Lisp syntax.
;;
;; Author: j.j.oddie at gmail.com
;; Hacked additiionally by: opensource at hardakers dot net
;;
;; This code is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published
;; by the Free Software Foundation; either version 2, or (at your