Skip to content

Instantly share code, notes, and snippets.

// A variation on the "fortune telling device" grove tutorial at
// http://www.instructables.com/id/grove-lucky-dumpling/
// (same circuit).
// It's a "heart analyzer" that "can tell from your pulse"
// what you feel and about what. This gives 9*8 possible
// messages instead of the original 12, and by adding a
// few more "feel" and "about" entries, you can easily
// get a pretty large range.
#include <Wire.h>
@thedod
thedod / readme.md
Last active August 29, 2015 14:02
Stic2k2Cane [outdated. kept as a placeholder].

This sketch was replaced with a better one. Please go here

@thedod
thedod / config.log
Created April 21, 2014 23:31
Ignore me :)
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by toxic configure 0.3.3, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ ./configure --enable-av
## --------- ##
## Platform. ##
@thedod
thedod / README.md
Last active August 29, 2015 14:00
Example code to demonstrate SqlCipherDatabase peewee backend

Peewee playhouse.sqlcipher_ext example

You're prompted for a passphrase (should be at least 8 characters long. Real-life apps should enforce a more strict passphrase strength policy). If the file testsqlcipher.db doesn't exist, it will be created with this passphrase, otherwise - the passphrase should match the existing db (or it can't be decrypted [hopefully]).

@thedod
thedod / example_installer.py
Last active August 29, 2015 13:58
Example of how a twister/swizzler/etc. installer could look with npyscreen
import npyscreen
class TestInstaller(npyscreen.NPSApp):
def main(self):
# These lines create the form and populate it with widgets.
# A fairly complex screen in only 8 or so lines of code - a line for each control.
f = npyscreen.Form(name="Example installer: edit an RPC url",)
fields = {
'username':f.add(npyscreen.TitleText, name="Username:"),
'password':f.add(npyscreen.TitlePassword, name="Password:"),
@thedod
thedod / README.md
Last active December 23, 2021 22:51
Golden slate - golden variation on http://bootswatch.com/slate/
@thedod
thedod / README.md
Last active December 23, 2021 22:51
C3po bootstrap theme. Based on Cyborg, a bit more golden.
@thedod
thedod / README.md
Last active January 1, 2016 11:09
Add live subtitles via web

###What it does You run osdd (on screen display demon) on the machine that is connected to a projector/live video cast/etc., and it lets a translator access it via web and overlay the display with subtitles. It is protected from mischief with basic auth (browser's user/password) and SSL with a self-signed certificate (would show you a security warning, but it's "for your own good"TM).

###Prerequesites

  • sudo apt-get install gnome-osd python-pip zenity
  • sudo pip install pystache
  • sudo pip install cherrypy (avoid the ancient apt-get python-cherrypy)

###Configuration (once)

@thedod
thedod / README.md
Last active December 27, 2015 21:59
Weird folder renamer (it's for a friend :) )

Put renamer.sh and renamer-aux.sh in a folder on your executable path (note that they should both be in the same folder).

Now cd somewhere and run renamer.sh, you'll get a series of mv commands to rename each folder from SOMEFOLDER/ to somefile-AT-somefolder/ where somefile is the name of the first file under somefolder/ (according to filename sort order).

Why would you need this? Beats me. A friend asked for it.

Note: Order does matter. The output you get from renamer.sh may contain (e.g.):

mv "/a/b/c/" "/a/b/something-AT-c"

mv /a/b/" "/a/aomething-AT-b"

@thedod
thedod / README.md
Last active December 23, 2015 02:39
decouch - dump couchdb data as a folder of .json files

As @DEVOPS_BORAT once said: "most big-datas are pretty small", so what if you have one of those and you just want the data as simple and greppable [or whateverable] json?

Here's a small python script ftw.

Requires py-couchdb