Skip to content

Instantly share code, notes, and snippets.

Kent Brewster kentbrew

Block or report user

Report or block kentbrew

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kentbrew
kentbrew / glint.html
Created Jun 13, 2015
Glint 1.0: a single-page puzzle game straight outta 1994. See me run on http://tilde.club/~kentbrew/glint.html
View glint.html
<!doctype html>
<html>
<head>
<title>Glint 1.0</title>
<style>
body {
font-family: monospace;
}
</style>
</head>
@kentbrew
kentbrew / mypage.html
Created Feb 17, 2010
Evolving a JavaScript Widget
View mypage.html
<!doctype html>
<html>
<head>
<title>My Javascript Widget</title>
</head>
<body>
<script src="widget.js"></script>
</body>
</html>
@kentbrew
kentbrew / mypage.html
Created Feb 24, 2010
Evolving a JavaScript Widget, part 2
View mypage.html
<!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>
@kentbrew
kentbrew / _readme.txt
Created Mar 14, 2010
SxSW Panel Widget
View _readme.txt
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
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.
@kentbrew
kentbrew / twittermonkey.user.js
Created May 11, 2010
Monkeying with Twitter
View twittermonkey.user.js
// ==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 //
//////////////////////////////////////////////
@kentbrew
kentbrew / aiee.html
Created Nov 15, 2010
A simple way to filter users of old IE browsers
View aiee.html
<!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 how-i-got-ssl-working-with-node.js
// works with node-0.2.4, not node-0.3.6; be SURE you got node to build with OpenSSL
//
// you will need working SSL key and cert, otherwise:
// openssl genrsa -out privatekey.pem 1024
// openssl req -new -key privatekey.pem -out certrequest.csr
// openssl x509 -req -in certrequest.csr -signkey privatekey.pem -out certificate.pem
//
// map port 8443 to 443 and 8080 to 80; see gist 776580 to do this on EC2
var http = require('http'), crypto = require('crypto'), fs = require("fs");
@kentbrew
kentbrew / jspat6_4.html
Created Jan 25, 2011
Pro JS Design Patterns Sample Code
View jspat6_4.html
<html>
<head>
<title>Chapter 6 Section 4, Pro JavaScript Design Patterns</title>
</head>
<body>
<script>
// this is straight from the code exampes at http://jsdesignpatterns.com/
// sadly, it fails with a syntax error. quoth JSLint:
//
View jspat6_4.html
<html>
<head>
<title>Chapter 6 Section 4, Pro JavaScript Design Patterns</title>
</head>
<body>
<script>
// this is straight from the code exampes at http://jsdesignpatterns.com/
// sadly, it fails with a syntax error. quoth JSLint:
//
You can’t perform that action at this time.