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 connect = require('connect') | |
| , proxy = require('http-proxy') | |
| function redirect(loc) { | |
| return connect.createServer(function(req, res){ | |
| res.writeHead(301, { "Location": loc }); | |
| res.end(); | |
| }); | |
| } |
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
| <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> | |
| <script type="text/javascript"> | |
| $(document).ready(function() { | |
| $('.accordionHead').unbind('click').bind('click', function() { | |
| $('.open').removeClass('open').slideUp('fast'); | |
| $(this).next('.accordionContent').slideDown('fast', function() { | |
| $(this).addClass('open'); | |
| }); | |
| }); |
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 loadScriptAsync = function(url) { | |
| var body = document.body; | |
| var div = document.createElement('div'); | |
| div.style.display = 'none'; | |
| body.insertBefore(div, body.firstChild); | |
| var iframe = document.createElement('iframe'); | |
| iframe.frameborder = 0; | |
| // seems like the meebo guys use this "m" tag for some magic I don't guess right now |
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 iframeSrc = 'http://mydomain.com?query=string'; | |
| var iframe = '<iframe id="myId"></iframe>'; | |
| $('body').append(iframe); | |
| $('#myId').attr('src', iframeSrc); |
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 sys = require('sys'), | |
| http = require('http'); | |
| http.createServer(function (req, res) { | |
| res.writeHead(200, {'Content-Type': 'text/plain'}); | |
| res.end('Hello World\n'); | |
| }).listen(8000); | |
| sys.puts('Server running at http://127.0.0.1:8000/'); |
NewerOlder