Skip to content

Instantly share code, notes, and snippets.

netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserRead');
$.get("http://twitter.com",
function(response) {
var token= response.match(/authenticity_token.*?value="(.*?)"/)[1]
netscape.security.PrivilegeManager.enablePrivilege('UniversalBrowserRead');
$.post("http://twitter.com/sessions", {
"session[authenticity_token]": token,
"session[username_or_email]": $("#username").val(),
"session[password]": $("#password").val()
}, function(html) {
@mahemoff
mahemoff / finding jQuery andSelf useful
Created August 21, 2009 14:19
finding jQuery andSelf useful
$(".delete").live("click", function() {
$(this).parents("tr").prev().andSelf().remove();
});
/*
* Flip! jQuery Plugin (http://lab.smashup.it/flip/)
* @author Luca Manno (luca@smashup.it) [http://i.smashup.it]
* [Original idea by Nicola Rizzo (thanks!)]
*
* @version 0.5
*
* @changelog
* v 0.5 -> Added patch to make it work with Opera (thanks to Peter Siewert), Added callbacks [Feb. 1, 2008]
* v 0.4.1 -> Fixed a regression in Chrome and Safari caused by getTransparent [Oct. 1, 2008]
tags: systemConfig
/**
* Interface Elements for jQuery
*
* http://interface.eyecon.ro
*
* Copyright (c) 2006 Stefan Petre
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
/**
* Interface Elements for jQuery
*
* http://interface.eyecon.ro
*
* Copyright (c) 2006 Stefan Petre
* Dual licensed under the MIT (MIT-LICENSE.txt)
* and GPL (GPL-LICENSE.txt) licenses.
*
*
<html>
<head>
<title>QUnit Test</title>
<script type="text/javascript">
/*
* jQuery JavaScript Library v1.3.2
* http://jquery.com/
*
* Copyright (c) 2009 John Resig
* Dual licensed under the MIT and GPL licenses.
#!/bin/bash
# The makings of a simple backup utility. In cronjob, add:
# 45 * * * * /path/to/backup.sh
# CHANGE THIS
DAILY_BACKUP_HOUR="00" # the hour when content is dumped to permanent daily backup
function dumpValuableContent() {
curl -O http://example.com
}
// a small mod of the autocomplete plugin at http://www.pengoworks.com/workshop/jquery/autocomplete.htm
// this mod lets you autocomplete on multiple words inside the input field
// my use case is tag completion in tiddlywiki - a single input field is presented, where the user enters
// space-separated tags. I want each of those to be auto-completed, not just the first one.
jQuery.autocomplete = function(input, options) {
// Create a link to self
var me = this;
// Create jQuery object for input element
equals = function(actual, expected) {
ok(_(actual).isEqual(expected),
"expected **" + expected + "**, got **" + actual + "**");