Skip to content

Instantly share code, notes, and snippets.

View tjconnelly's full-sized avatar
😎

TJ Connelly tjconnelly

😎
View GitHub Profile
@esperlu
esperlu / mysql2sqlite.sh
Created April 27, 2011 05:46
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
@kconragan
kconragan / keyrepeat.shell
Last active December 4, 2023 03:40
Enable key repeat in Apple Lion for Sublime Text in Vim mode
# Mac OS X Lion introduced a new, iOS-like context menu when you press and hold a key
# that enables you to choose a character from a menu of options. If you are on Lion
# try it by pressing and holding down 'e' in any app that uses the default NSTextField
# for input.
#
# It's a nice feature and continues the blending of Mac OS X and iOS features. However,
# it's a nightmare to deal with in Sublime Text if you're running Vintage (Vim) mode,
# as it means you cannot press and hold h/j/k/l to move through your file. You have
# to repeatedly press the keys to navigate.
@djs52
djs52 / spideroak-default.sh
Created September 24, 2012 16:30
Init script (/etc/init.d/spideroak) and default (/etc/default/spideroak) for SpiderOak from https://launchpad.net/~tonio
# defaults file for spideroak daemon headless mode
# SpiderOak does not currently support handling the initial setup of
# an account, or setup of a new device within an account entirely from
# the command line. This is because the new user setup process requires
# the user to answer a CAPTCHA and some other validation processes.
#
# Instead, we recommend connecting to the headless server using "ssh -X"
# to forward X11 connections back to your local desktop machine with X11
# running. Within your ssh session to the headless server, run SpiderOak