Instantly share code, notes, and snippets.

Mike Walker incredimike

View GitHub Profile
View minimidi.ino
// Minimidi Teensy Midi Controller
// Mike Walker (
// Based on code originally by Philip Cunningham (
// Smoothing hacked from
// Set midi channel to send to 1
int channel = 1;
// Smoothing amount
const int numReadings = 10;
View rename_media_to_directory_name.php
* Media renamer for Obfuscated file names sometimes found when downloading from usenet.
* This script will find scan all directories in $in_path.
* For each directory, it will search for a media file.
* If a media file is found, it will copy that file into the "output path" while also renaming the file to the "basepath" of the containing directory.
$find_extensions = ['mkv','avi'];
$remove_from_filename = ['-Obfuscated','-postbot'];

Keybase proof

I hereby claim:

  • I am incredimike on github.
  • I am incredimike ( on keybase.
  • I have a public key whose fingerprint is 0C61 4943 5490 2401 09CE E3EA 0035 5C1D F3BB 04CA

To claim this, I am signing this object:

View Chrome Form Filler options
View json_decode_nice.php
function json_decode_nice($json, $assoc = FALSE){
$json = str_replace(array("\n","\r"),"",$json);
$json = preg_replace('/([{,]+)(\s*)([^"]+?)\s*:/','$1"$3":',$json);
$json = preg_replace('/(,)\s*}$/','}',$json);
return json_decode($json,$assoc);
// Example:
View gist:5292867
<?php # Add the following to
$cfg['Export']['sql_drop_database'] = true;
$cfg['Export']['sql_drop_table'] = true;
$cfg['Export']['compression'] = 'zip';
View gist:3087059
find . -type d -exec chmod 775 {} \;
find . -type f -exec chmod 664 {} \;
View gist:2380043
# textutil -convert html file.doc -stdout | pandoc -f html -t markdown -o
see also:
# A shell script that tries its best to convert documents thrown at it
# to pandoc's extended markdown.
# Depends on:
# + textutil: an OS X only command line utility
# + a tweaked version of
# + pdftohtml: a utility for converting pdf to html
View country_list.js
// List of all countries. The & character has been converted into &amp; for you, in case you want to use this directly in HTML.
// Last updated June 11, 2018
var country_list = ["Afghanistan","Albania","Algeria","Andorra","Angola","Anguilla","Antigua &amp; Barbuda","Argentina","Armenia","Aruba","Australia","Austria","Azerbaijan","Bahamas"
,"Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bosnia &amp; Herzegovina","Botswana","Brazil","British Virgin Islands"
,"Brunei","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Canada","Cape Verde","Cayman Islands","Chad","Chile","China","Colombia","Congo","Cook Islands","Costa Rica"
,"Cote D Ivoire","Croatia","Cruise Ship","Cuba","Cyprus","Czech Republic","Denmark","Djibouti","Dominica","Dominican Republic","Ecuador","Egypt","El Salvador","Equatorial Guinea"
,"Estonia","Ethiopia","Falkland Islands","Faroe Islands","Fiji","Finland","France","French Polynesia","French West Indies","Gabon","Gambia","Georgia",