Skip to content

Instantly share code, notes, and snippets.

nebulous

View GitHub Profile
@nebulous
nebulous / cabinet-lights.ino
Created Feb 29, 2016
Arduino source for Digistump Oak undercabinet lights
View cabinet-lights.ino
#include <ClickButton.h>
#include <pt.h>
#include "math.h"
//inputs
#define upPin 7
#define dnPin 8
//outputs
#define ledPin 1
@nebulous
nebulous / jquery.jemplate.js
Created May 29, 2015
Simple jQuery plugin for Jemplate rendering
View jquery.jemplate.js
(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 Jan 26, 2012 — forked from esperlu/mysql2sqlite.sh
MySQL to Sqlite converter
View mysql2sqlite.sh
#!/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
You can’t perform that action at this time.