View mypage.html
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
<!doctype html> | |
<html> | |
<head> | |
<title>My Javascript Widget</title> | |
</head> | |
<body> | |
<script src="widget.js"></script> | |
</body> | |
</html> |
View mypage.html
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
<!doctype html> | |
<html> | |
<head> | |
<title>My Javascript Widget</title> | |
</head> | |
<body> | |
<script src="widget.js" settings="msg=Hey%2c+cool!+It+worked!"></script> | |
</body> | |
</html> |
View _readme.txt
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
1: copy index.html and sxsw.js to your local hard drive. | |
(For best results, click the RAW link next to each one.) | |
2: drag index.html into your browser. | |
3: have fun, and hit me up on Twitter at @kentbrew if you're having trouble. |
View _readme.txt
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
1: copy index.html and sxsw.js to your local hard drive. | |
(For best results, click the RAW link next to each one.) | |
2: drag index.html into your browser. | |
3: have fun, and hit me up on Twitter at @kentbrew if you're having trouble. |
View Working Around Broken Google Calendar Sync for IPad
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
So, after you've fought your way through setting up Exchange calendar sharing on your iPad, you will quickly discover it's only showing you your base calendar and not any you might have shared. | |
If you try to go to http://m.google.com/sync and set up calendar sharing on your iPad, it won't work because it doesn't recognize your user agent. I'm guessing they'll have this fixed shortly, but in the meantime: | |
On a desktop Safari installation, enable the debug menu, set the user agent to iPhone, and disable JavaScript. From there, visit http://m.google.com/sync. It will want you to sign in to your Google account, if you have not done so already. (I'm sure you could also do this with Firefox and a user-agent switcher.) | |
Select your iPad and the calendars you want to share; if you've done everything else right with your iPad (set up push, etc) it should work. |
View twittermonkey.user.js
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 Monkeying with Twitter | |
// @namespace kentbrewster.com | |
// @description A teaching framework for Greasemonkey. Our target for tonight: Twitter | |
// @include http://twitter.com/* | |
// ==/UserScript== | |
////////////////////////////////////////////// | |
// make sure Greasemonkey is really working // | |
////////////////////////////////////////////// |
View aiee.html
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
<!DOCTYPE html> | |
<html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'> | |
<title>Browser Not Supported</title> | |
<meta content='text/html;charset=UTF-8' http-equiv='Content-Type'> | |
<style type='text/css'> | |
body { | |
color:#fff; | |
background:#00f; | |
text-align:center; | |
font-family: 'Courier New', Courier, monospace; |
View favicon-interceptor.js
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
// early experiments with node had mysterious double requests | |
// turned out these were for the stoopid favicon | |
// here's how to short-circuit those requests | |
// and stop seeing 404 errors in your client console | |
var http = require('http'); | |
http.createServer(function (q, r) { | |
// control for favicon |
View tiny-web-server.js
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
// hey, everybody! it's a tiny Web server! | |
// instead of a bunch of foo = reqire("foo") | |
// list our required modules and loop through | |
var r = [ "fs", "http", "mime", "path", "url" ]; | |
for (var i = 0; i < r.length; i++) { | |
global[r[i]] = require(r[i]); | |
} | |
// some constants |
View setMultiHeaders.js
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
response.writeHead(200, { | |
'p3p': ['policyref="http://foo.com/p3p.xml"', 'CP="OOO EEE OOH AH AHH"'], | |
'Set-Cookie': ['ting="tang; expires=0; path=/;"', 'wallawalla="bingbang; expires=123456789; path=/;"'], | |
'Content-Type': 'text/html' | |
}); |
OlderNewer