Skip to content

Instantly share code, notes, and snippets.

View nebulous's full-sized avatar

nebulous

View GitHub Profile
@nebulous
nebulous / jquery.jemplate.js
Created May 29, 2015 15:03
Simple jQuery plugin for Jemplate rendering
(function($) {
/* Simplistic jQuery plugin for Jemplate v0.01
http://github.com/nebulous
*/
$.fn.jemplate = function(tmplin, datain) {
var data_url;
if (typeof(tmplin) == "object") {
datain = tmplin.stash || tmplin || {};
tmplin = datain.jemplate || '';
}
@nebulous
nebulous / mysql2sqlite.sh
Created January 26, 2012 16:06 — forked from esperlu/mysql2sqlite.sh
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
@nebulous
nebulous / cabinet-lights.ino
Created February 29, 2016 00:26
Arduino source for Digistump Oak undercabinet lights
#include <ClickButton.h>
#include <pt.h>
#include "math.h"
//inputs
#define upPin 7
#define dnPin 8
//outputs
#define ledPin 1