Skip to content

Instantly share code, notes, and snippets.

@elmarcoh
elmarcoh / form_fill.js
Created November 24, 2012 01:25
Form fill Bookmarklet with Chilean RUT
//Caution when minifiyng this file: the modulus operator in getRut must have spaces around it, otherwise
//Chrome throws an error, and the damn thing won't work
var auto =
{
names: 'Steve Buscemi Catherine Keener Dermot Mulroney Danielle Zerneck James LeGros Rica Martens Peter Dinklage Kevin Corrigan Hilary Gilford Robert Wightman Tom Jarmusch Michael Griffiths Matthew Grace Ryan Bowker Francesca DiMauro',blurb: 'phpBB is a free, open source Internet community application, with outstanding discussion forums and membership management. Written in the PHP scripting language, and making use of the popular MySQL database, phpBB is a standard among web hosting companies throughout the world, and is one of the most widely-used bulletin board packages in the world. phpBB short-circuits the need for you to be a web development master in order to create and manage massive online communities',password: 'secret',fillerup: function()
{
var all_inputs = document.getElementsByTagName('input');var all_selects = documen
@elmarcoh
elmarcoh / table_init.js
Created October 26, 2012 21:35
Using Tastypie as an Ajax Source for DataTables
$('#participantes-table').dataTable({
bProcessing: true,
bServerSIde: true,
sAjaxSource: "/path/to/your/tastypie/api/list/objects/?format=json",
sAjaxDataProp: "objects",
aoColumns: [
// Put the resource name that corresponds to each table column
{'mData': "your"},
{'mData': "columns"},
],