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
| /* | |
| works in: | |
| * chrome | |
| * firefox 3.5+ | |
| * safari (with quicktime installed) | |
| * ie 6+ | |
| I ended up only needing an ogg and mp3 version | |
| of the file I wanted to play. Any browser that | |
| has m4a support also worked with mp3. |
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 foo = function (bar, baz) {}; | |
| var getBaz = function (callback) { | |
| var baz = 3; | |
| callback(baz); | |
| }; | |
| var bar = 2; | |
| getBaz(function (baz) { foo(bar, baz); }); |
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 genPass = function () { | |
| var pass = ''; | |
| var len = 20; | |
| while (len--) { | |
| pass += String.fromCharCode(Math.floor(Math.random() * 95) + 32); | |
| } | |
| return pass; | |
| }; |
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 chars = [ | |
| "$", "-", "_", ".", "+", | |
| "<", ">", "#", "%", '"', "{", "}", "|", "\\", "^", "~", "[", "]", "`", "!", | |
| "*", "'", "(", ")", ",", ";", "/", "?", ":", "@", "&", "=" | |
| ]; | |
| console.log( | |
| chars.map(function (c) { return escape(c); }). | |
| map(function (c) { return escape(unescape(c)); }) | |
| ); |
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
| <a id="last" href="#">last</a> | |
| <img id="mug" count="4" src="mug4.png" /> | |
| <a id="next" href="#">next</a> | |
| ... | |
| $('#last').click(function () { | |
| var mug = $('#mug'); | |
| var count = mug.attr('count'); | |
| count = (count - 1) % 48; |
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 Client = require('irc').Client; | |
| var client = new Client('example.com', 'joe', { port: 6601, secure: true }); | |
| client.on('motd', function () { | |
| client.join('#test', function () { | |
| client.say('#test', 'holy shit that was easy'); | |
| }); | |
| }); |
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 http = require('http'); | |
| var url_parse = require('url').parse; | |
| var routes = {}; | |
| var methods = ['get', 'put', 'post', 'delete']; | |
| methods.forEach(function (method) { routes[method] = []; }); | |
| var addRoute = function (method, pattern, callback) { |
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 Script = process.binding('evals').Script; | |
| try { Script.runInNewContext('var a = 2; a.boats();', window); } 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
| var jerk = require('jerk'); | |
| var http = require('http'); | |
| var options = { | |
| server: 'eng.borderstylo.int', | |
| nick: 'SnakeEyes', | |
| channels: ['#rd', '#clients'] | |
| }; | |
| var irc = jerk(function (j) {}).connect(options); |
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/perl | |
| use strict; | |
| use warnings; | |
| use LWP::UserAgent; | |
| use Math::BaseArith; | |
| my $browser = LWP::UserAgent->new; | |
| sub get { |