Skip to content

Instantly share code, notes, and snippets.

@bign8
bign8 / 0_reuse_code.js
Created February 11, 2017 15:41
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@bign8
bign8 / mysql2sqlite.sh
Last active December 13, 2022 09:30 — forked from esperlu/mysql2sqlite.sh
Combining many of the forks to build a simple script that works
#!/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.
# Usage: $ ./mysql2sqlite mysqldump-opts db-name | sqlite3 database.sqlite
# Example: $ ./mysql2sqlite --no-data -u root -pMySecretPassWord myDbase | sqlite3 database.sqlite
@bign8
bign8 / README.md
Last active April 1, 2018 12:35 — forked from ncr/README
jQuery plugin to allow single and double click handlers on an element

Code

$("button").single_double_click(function () {
  alert("Try double-clicking me!")
}, function () {
  alert("Double click detected, I'm hiding")
  $(this).hide()
})