Skip to content

Instantly share code, notes, and snippets.

View mattwhite's full-sized avatar

Matt White mattwhite

  • IBM
  • Bellingham, WA, USA
View GitHub Profile
@mattwhite
mattwhite / build-bash-lenny.sh
Last active August 29, 2015 14:06
Compile Bash 3.2 from source for Debian Lenny to patch the shellshock vulnerabilities (CVE-2014-6271, CVE-2014-7169, CVE-2014-6277, CVE-2014-6278, CVE-2014-7186, CVE-2014-7187)
# inspired by http://askubuntu.com/a/528171 and the comments below
# build bash 3.2, though this should work for other versions as well
BASH_MAJOR=3
BASH_MINOR=2
# prerequisites
sudo apt-get install build-essential gettext bison
# get bash source
#!/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 dump.sql | sqlite3 database.sqlite
@mattwhite
mattwhite / -
Created December 2, 2013 16:35
hello world