Scripts and plugins

This is a collection of scripts and plugins I’ve written that may be of use to others. All were written for my own projects and may need some editing and customization to work in other applications. All files were given the .txt extension to prevent parsing by the web browser.

JQuery

Note: these don’t always follow the jQuery plugin guidelines

  • hasData.js – filters a set of jQuery objects depending upon whether or not their .data object contains specified data (keys, values, or both)
  • loadHTML5Data.js – a reimplementation of jQuery’s poor handling of HTML5 data-* attributes
  • autoValidate.js – for live validation of form data

Javascript

  • qControl.js – a page queue control I use to stack ajax requests to ensure they complete before other code is run, can be used to stack any pieces of code to ensure they are executed in a given order

PHP

  • genericDBControls.php – a set of classes to perform mySQL database queries, these build the queries on the fly, one has only to set which fields to read, etc.
  • errorHandler.php – logs error messages generated by php scripts
  • errorSettings.php – contains the settings necessary for errorHandler.php
  • serverReturnPlugin.php – used to send data from a php script back to the requesting webpage (original request made by ajax), keeps data formatted consistently
  • sqlLogger.php – used to log sql queries to a mySQL table for record keeping, does not log its own queries

Bash

  • toggle-pulseaudio-mute.sh – I bind this script to a key so that I can mute/un-mute my audio with a key press
  • background-refresher.sh – continually refreshes the X11 desktop, useful if your background image is dynamic, for example you might want to set your background to a picture from a webcam
  • invoke-xmodmap.sh – runs xmodmap, I bind this to a key to initiate manually because XFCE overrides they key bindings a lot

Python

  • extractYatX – a QtiPlot plug-in/script that extracts, from a series of curves in a graph, the y-value for each at a given x-value, into a new table.
  • batchTable – a QtiPlot plug-in/script to perform operations on many tables at once

Leave a Reply

Your email address will not be published. Required fields are marked *