Skip to content

Instantly share code, notes, and snippets.

@mazz
mazz / gist:353152b512c35f414622892471166073
Created January 22, 2017 01:21 — forked from miohtama/gist:0f64104fc8aefde8360f0c70cf46b950
SMS based login for React and Websauna app
"""
allows users to sign up and login with their phone number, if that number is assoicated with an
existing customer record.
"""
import logging
import colander
from cornice.service import Service
from pyramid.exceptions import HTTPBadRequest
from pyramid_sms.utils import normalize_us_phone_number
@mazz
mazz / auto_dubstep.rb
Created August 22, 2016 20:58 — forked from xavriley/auto_dubstep.rb
Auto generating dubstep with Sonic Pi
# DUBSTEP
# Combines ideas from my other gists
current_bpm = 140.0
use_bpm current_bpm
# WOBBLE BASS
define :wob do
use_synth :dsaw
lowcut = note(:E1) # ~ 40Hz
highcut = note(:G8) # ~ 3000Hz
@mazz
mazz / mysql2sqlite.sh
Created August 14, 2016 05:35 — 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