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 chosen 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.
# Jachin - I changed this so I could run just the awk part.
server {
listen 80;
server_name app.example.com;
rewrite ^ https://$server_name$request_uri? permanent;
}
server {
listen 443;
server_name app.example.com;
#!/usr/bin/python
#
# by Nathan Grigg http://nb.nathanamy.org
#
import sys
import argparse
import os.path
from subprocess import Popen,PIPE
@jachin
jachin / gist:4271020
Created December 12, 2012 19:57 — forked from defiant/MacOsX Context Cleaner
This removed duplicated entries in the "Open with..." contextual menu in OS X.
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -kill -r -domain local -domain system -domain user