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
| CmdUtils.CreateCommand({ | |
| name: "bespin", | |
| icon: "https://bespin.mozilla.com/favicon.ico", | |
| homepage: "http://bespin.mozilla.com/", | |
| author: {name: "Atul Varma", email: "[email protected]", | |
| homepage: "http://www.toolness.com"}, | |
| license: "MIT", | |
| description: "Super-primitive Bespin integration.", | |
| help: "You can run any Bespin command-line command via Ubiquity; just make sure you're on a tab with the Bespin editor when you use the command.", | |
| takes: {"command": /.*/}, |
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
| try { | |
| Gilt.Hummingbird.track( {"pageName":"login","server":"www.gilt.com","channel":"login","pageType":null,"prop1":null,"eVar1":null,"prop2":null,"eVar2":null,"prop3":null,"eVar3":null,"prop4":"login page","eVar4":null,"prop5":null,"eVar5":null,"prop6":null,"eVar6":null,"prop7":null,"eVar7":null,"prop8":null,"eVar8":null,"prop9":null,"eVar9":null,"prop10":null,"eVar10":null,"prop11":null,"eVar11":null,"prop12":null,"eVar12":null,"prop13":null,"eVar13":null,"prop14":null,"eVar14":null,"prop15":null,"eVar15":null,"prop16":null,"eVar16":null,"prop17":null,"eVar17":null,"prop18":null,"eVar18":null,"prop19":null,"eVar19":null,"prop20":null,"eVar20":null,"campaign":null,"state":null,"zip":null,"events":"","products":"","purchaseID":null,"trackingServer":"stat.gilt.com","trackingServerSecure":"sstat.gilt.com"} ); | |
| } catch(e) {} | |
| }); |
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
| HummingbirdTracker = {}; | |
| HummingbirdTracker.track = function(env) { | |
| delete env.trackingServer; | |
| delete env.trackingServerSecure; | |
| env.u = document.location.href; | |
| env.bw = window.innerWidth; | |
| env.bh = window.innerHeight; | |
| env.guid = document.cookie.match(/guid=([^\_]*)_([^;]*)/)[2]; | |
| env.gen = document.cookie.match(/gender=([^;]*);/)[1]; | |
| env.uid = document.cookie.match(/user_id=([^\_]*)_([^;]*)/)[2]; |
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
| var db = indexedDB.open('books', 'Book store', false); | |
| if (db.version !== '1.0') { | |
| var olddb = indexedDB.open('books', 'Book store'); | |
| olddb.createObjectStore('books', 'isbn'); | |
| olddb.createIndex('BookAuthor', 'books', 'author', false); | |
| olddb.setVersion("1.0"); | |
| } | |
| // db.version === "1.0"; | |
| var index = db.openIndex('BookAuthor'); | |
| var matching = index.get('fred'); |
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
| var store = db.openObjectStore('Contact'); | |
| var lincoln = {name: 'Lincoln', number: '7012'}; | |
| var contact = store.put(lincoln); | |
| // contact.id === 1 | |
| var contact = store.get(1); | |
| // contact.name === 'Lincoln' |
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
| #!/usr/bin/env perl | |
| print "`"; | |
| while (<>) { | |
| print; | |
| } | |
| print "`"; |
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
| // draw a URL that the reader can pick up and launch a browser say | |
| // basic library | |
| draw_qrcode("http://functionsource.com/"); | |
| // jQuery plugin | |
| jquery('#insertit').qrcode("http://functionsource.com/"); |
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
| var zombie = require("zombie"); | |
| var assert = require("assert"); | |
| // Load the page from localhost | |
| zombie.visit("http://localhost:3000/", function (err, browser, status) { | |
| // Fill email, password and submit form | |
| browser. | |
| fill("email", "[email protected]"). | |
| fill("password", "eat-the-living"). |
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
| // the code of the "foo" function | |
| // never changes, but the "this" value | |
| // differs in every activation | |
| function foo() { | |
| alert(this); | |
| } | |
| // caller activates "foo" (callee) and | |
| // provides "this" for the callee |
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
| if (phantom.state.length === 0) { | |
| phantom.state = 'pizza'; | |
| phantom.open('http://www.google.com/m/local?site=local&q=pizza+nyc'); | |
| } else { | |
| var list = document.querySelectorAll('div.bf'); | |
| for (var i in list) { | |
| console.log(list[i].innerText); | |
| } | |
| phantom.exit(); | |
| } |
OlderNewer