A few projects I've worked on

Music Teachers' Website

In 2012, I put together this website for the West Los Angeles branch of the Music Teachers' Association of California. It's a WordPress site, and was my first WordPress project.

http://mtacwla.org

I trained music teachers and high school students in adding and editing pages and calendar events.

Sanskrit transliteration: a little javascript project

http://david9.freepgs.com/lang/sanskrit/

A transliteration web page to help with Indic text (e.g. Sanskrit, Hindi, Marathi).
Roman/English text is transliterated to Devanagari; additionally Roman with special diacritics is also created.

Try copy/pasting the following into the input box:

vakra tuNDa mahaakaaya
suuryakoTii samaprabha
nirvignam kurumedeva
sarvakaaryeShu sarvadaa

The javascript sources:
tools.js
letters.js
sanskritrans.js

Debian iPhone wiki page: an adventure in documentation

https://wiki.debian.org/iPhone (my last revision)

When I needed to connect an iPhone to my Linux computer in order to rescue some music from it, I found the above wiki page (at this older revision). However, Apple had changed the connection requirements, and the instructions didn't work.
I did a great deal of work to get things working, and documented all of it on the wiki.
It is sufficiently comprehensive that the backporting instructions are useful for other applications as well.

Crop-helper: assisted cropping of audio/video files

Crop-helper.bash.txt

A bash script to assist in lossless cropping of videos (or music).
Prompts for start and end positions, and plays 3-second test clips to show how the cropping turns out.
Uses mplayer for playback and avconv for cropping

Shiftstate - get the state of ctrl/alt/shift keys

shiftstate.c.txt

When I went to write a script to respond to volume up/down buttons on my laptop, I found that I wanted some interesting features: pressing ctrl+vol will change the volume by bigger steps, and alt+vol will change the volume by smaller steps.
However, discovering the state of the shift keys requires looking at the device tree.
I wrote this little C program to do that

ixheapq - Indexing python heapq

A work in progress: I wanted to add several features to the python heapq module:

  1. Quickly remove an object from the heap, whose index (location in the heap) is unknown
  2. Support different comparison operators for heap members
  3. Support easy reversal (maxheap instead of minheap)
Source: ixheapq.py

I've done only a little testing on it, and am presently working on adapting the official test_heapq.py script to test ixheapq.
I originally had this idea as a way of solving the "skyline" programming problem -- here is my skyline solution.

adb copy: bash + android debug bridge

Adb-howto.txt

A short bash script to facilitate copying groups of files and directories from an android device to a laptop via adb/usb.

Lftp-compare and Lftp-put

Lftp-compare.bash.txt

I usually work from the command line; however I find most CLI ftp tools to be cumbersome.
I wanted a quick way to do two things from my shell:

  1. Download current versions of several files, and compare them to my local copies
  2. Upload my own files to the server
The script does just this, and more! I use it all the time.
Here are a few notes about it: what it does, a few implementation details, and other features:



~David