This file contains hidden or 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 XHConn() | |
| { | |
| var xmlhttp, bComplete = false; | |
| try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } | |
| catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } | |
| catch (e) { try { xmlhttp = new XMLHttpRequest(); } | |
| catch (e) { xmlhttp = false; }}} | |
| if (!xmlhttp) return null; | |
| this.connect = function(sURL, sMethod, sVars, fnDone) | |
| { |
This file contains hidden or 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 Foo() { | |
| if (this == window) { | |
| var F = function(){ }; | |
| F.prototype = Foo.prototype; | |
| var inst = new F(); | |
| Foo.apply(inst, arguments); | |
| return inst; | |
| } | |
| else { | |
| this.init.apply(this, arguments); |
This file contains hidden or 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
| This gist aims to prove or disprove the assertion made here[1] and linked on | |
| Ajaxian[2] that dynamic script requests, or more specifically JSONP requests, | |
| leak memory in all modern browsers. | |
| The specific setup is a 200ms interval that requests an uncached script pointed at | |
| the simple php file. This file in response sends the following string: | |
| update() | |
| This is not technically a JSONP response, since the would-be callback is executed | |
| without arguments. However, memory footprint results can be gauged on generic |
This file contains hidden or 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 hidden or 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) |
This file contains hidden or 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
| ############################################################################### | |
| ## Mobify Apache Redirect Plugin v1.1 ## | |
| ## http://mobify.me ## | |
| ## ## | |
| ## Installation: ## | |
| ## ## | |
| ## First: for this to work, you need to configure a mobile site for ## | |
| ## yourself using Mobify. Then follow the CNAME setup instructions for ## | |
| ## pointing m.yoursite.com to your Mobify account: ## | |
| ## http://support.mobify.me/faqs/general/dns ## |
This file contains hidden or 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
| const Name = 'gatherer', | |
| Gatherer = 'http://gatherer.wizards.com/', | |
| Base = '<style>'+ <![CDATA[ | |
| .error {font-style:oblique; line-height:1.8} | |
| .logo {display:inline-block; max-width:100%} | |
| .logo > img {border:none; max-width:100%} | |
| .loading + .logo {opacity:0.4} | |
| .error + .logo {opacity:0.7} | |
| ]]> +'</style>'+ | |
| <div class={Name}><div id={Name}> </div |
This file contains hidden or 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 gist logs | |
| // @namespace http://d.hatena.ne.jp/murky-satyr | |
| // @description Shows commit logs on Gist in Opera | |
| // @include http://gist.github.com/* | |
| // @include https://gist.github.com/* | |
| // ==/UserScript== | |
| (function($, reHref, reLines) { | |
| $ && $('.id').each(function(i, me) { |
This file contains hidden or 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
| /* jquery.tinydb - jQuery interface to TinyDB (http://tinydb.org/) | |
| * Copyright (c) 2008 Chris Moyer ([email protected]) | |
| * | |
| * usage: | |
| * jQuery.tinydb.read(tinydb_id, callback); | |
| * callback is called with the data from TinyDB | |
| * | |
| * jQuery.tinydb.write({key: val, key2: val2}, callback); | |
| * write data, callback is called with tinydb_id string | |
| * |
This file contains hidden or 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
| Database = Class.create({ | |
| initialize: function(tableName) { | |
| this.tableName = tableName; | |
| this.db = openDatabase("Database Name", "1.0", "Display Name", 10000); | |
| }, | |
| handleFirstTimers: function(firstTimeCallback, everyOtherTimeCallback) { | |
| this.db.transaction(function(tx) { | |
| tx.executeSql("CREATE TABLE IF NOT EXISTS " + this.tableName + " (flag REAL)",[], function(tx, result) { | |
| tx.executeSql("SELECT flag FROM " + this.tableName, [], function(tx, result) { |
OlderNewer