This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// one-line quick test | |
javascript:(function(iframe) { iframe.src = 'data:text/html;base64,PCFkb2N0eXBlIGh0bWw+DQo8aHRtbD4NCjxoZWFkPg0KICA8c2NyaXB0IHR5cGU9InRleHQvamF2YXNjcmlwdCI+DQogICAgYWRkRXZlbnRMaXN0ZW5lcignbWVzc2FnZScNCiAgICAgICxmdW5jdGlvbihlKSB7DQogICAgICAgIGFsZXJ0KGUub3JpZ2luICsgJyBzYWlkOiAnICsgZS5kYXRhKTsNCiAgICAgIH0NCiAgICAgICxmYWxzZQ0KICAgICk7DQogIDwvc2NyaXB0Pg0KPC9oZWFkPg0KPGJvZHk+PC9ib2R5Pg0KPC9odG1sPg=='; iframe.contentWindow.postMessage('testing stuff', '*'); })(document.documentElement.appendChild(document.createElement('iframe'))) | |
// multi-line | |
javascript:(function(iframe) { | |
iframe.src = 'data:text/html;base64,PCFkb2N0eXBlIGh0bWw+DQo8aHRtbD4NCjxoZWFkPg0KICA8c2NyaXB0IHR5cGU9InRleHQvamF2YXNjcmlwdCI+DQogICAgYWRkRXZlbnRMaXN0ZW5lcignbWVzc2FnZScNCiAgICAgICxmdW5jdGlvbihlKSB7DQogICAgICAgIGFsZXJ0KGUub3JpZ2luICsgJyBzYWlkOiAnICsgZS5kYXRhKTsNCiAgICAgIH0NCiAgICAgICxmYWxzZQ0KICAgICk7DQogIDwvc2NyaXB0Pg0KPC9oZWFkPg0KPGJvZHk+PC9ib2R5Pg0KPC9odG1sPg=='; | |
iframe.contentWindow.postMessage('testing stuff', '*'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @description disables unnecessary status bar animation | |
// @include http://www.fuenterrebollo.com/Castilla/arcaismos.html | |
// ==/UserScript== | |
this.__defineSetter__('status', function(ignore) { }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/php -q | |
<? | |
include('Mail/mimeDecode.php'); | |
/* expects to receive mail from stdin */ | |
$input = file_get_contents("php://stdin"); | |
$params['include_bodies'] = true; | |
$params['decode_bodies'] = true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @include http://zonaele.com/* | |
// @include http://www.zonaele.com/* | |
// ==/UserScript== | |
(function(opera) { | |
var needle = 'if (top == self)'; | |
opera.addEventListener('BeforeScript' | |
,function(e) { | |
var text = e.element.text; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// one-liner | |
javascript:(function(src, count) { var img = new Image || document.createElement('img'); img.addEventListener('error', function() { if (!count) img.src = src; else alert('PASS'); count = 1; }, false); img.src = src; })('data:text/plain,fail') | |
// prettified | |
javascript:(function(src, count) { | |
var img = new Image || document.createElement('img'); | |
img.addEventListener('error' | |
,function() { | |
if (!count) | |
img.src = src; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ((typeof Node != 'undefined') && !document.selectNodes) { | |
Node.prototype.selectNodes = function(xpath, resolver) { | |
var contextNode = this.ownerDocument || this, result = [], i = 0, node | |
,nodes = contextNode.evaluate(xpath, contextNode, resolver || null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE, null); | |
while (node = nodes.snapshotItem(i++)) { | |
result.push(node); | |
} | |
return result; | |
}; | |
Node.prototype.selectSingleNode = function(xpath, resolver) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @method isEventSupported | |
* @param {String} eventName | |
* @param {HTMLElement} element optional | |
* @return {Boolean} true if event is supported | |
*/ | |
var isEventSupported = (function(){ | |
var TAGNAMES = { | |
'select':'input','change':'input', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function.prototype.partial = (function(slice, undefined) { | |
return function() { | |
var fn = this, args = slice.call(arguments); | |
return function() { | |
var arg = 0, index, length = arguments.length; | |
while (((index = args.indexOf(undefined)) > -1) && (index < length)) { | |
args.splice(index, 1, arguments[arg++]); | |
} | |
return fn.apply(this, args); | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Diff for gists for Opera | |
// @include http://gist.github.com/* | |
// @include https://gist.github.com/* | |
// @ujs:modified 2010-09-10 | |
// @ujs:download http://gist.github.com/raw/227881/53ad5dff46b825ea3facd77532b57da2ab445425/diff_for_gist.user.js | |
// ==/UserScript== | |
(function(window, $, rev) { | |
if (!$ || ((rev = $('#revisions li')).length < 2)) return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
APPNAME = org.avdi.myapp | |
VERSION = 1.0.0 | |
DEVICE = tcp | |
PACKAGEFILE = $(APPNAME)_$(VERSION)_all.ipk | |
VMNAME = "Palm Emulator (1.2.0.33)" | |
EMUPORT = 5522 | |
M4 = m4 | |
PACKAGE = palm-package | |
INSTALL = palm-install | |
INSTALLFLAGS = -d $(DEVICE) |