Skip to content

Instantly share code, notes, and snippets.

View thomasyip's full-sized avatar

Thomas Y thomasyip

View GitHub Profile
window.bkmt = [ navigator.userAgent,
'',
navigator.language,
document.defaultCharset,
(new Date()).getTime(),
screen.width,
screen.height,
screen.colorDepth,
(new Date()).getTimezoneOffset(),
(new Date()).toLocaleString(),
# NAME: authinabox
# VERSION: 1.01 (Dec 27, 2008)
# AUTHOR: Peter Cooper [ http://www.rubyinside.com/ github:peterc twitter:peterc ]
# DESCRIPTION: An "all in one" Sinatra library containing a User model and authentication
# system for both session-based logins OR HTTP Basic auth (for APIs, etc).
# This is an "all in one" system so you will probably need to heavily tailor
# it to your own ideas, but it will work "out of the box" as-is.
# COMPATIBILITY: - Tested on 0.3.2 AND the latest rtomayko Hoboken build! (recommended for the latter though)
# - NEEDS DataMapper!
# - Less work needed if you use initializer library -- http://gist.github.com/40238