Skip to content

Instantly share code, notes, and snippets.

Nate Smith nateps

Block or report user

Report or block nateps

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
@nateps
nateps / gist:02d0b0293880905476bd
Created Jul 12, 2014
Example ShareJS access control middleware for use with Derby
View gist:02d0b0293880905476bd
# Whitelist collections
ALLOW_COLLECTIONS = {
'accounts': true
'users': true
}
module.exports = (shareClient) ->
# Hold on to session object for later use. The HTTP req object is only
# available in the connect event
shareClient.use 'connect', (shareRequest, next) ->
@nateps
nateps / metamorph-bench.html
Created Dec 25, 2011
Simple metamorph benchmark
View metamorph-bench.html
<!DOCTYPE html>
<title></title>
<div id=status></div>
<div id=container style=display:none></div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script>
var src = window.location.hash.substr(1),
@nateps
nateps / gist:1492197
Created Dec 18, 2011
DOM range replacement between comment markers
View gist:1492197
<!DOCTYPE html>
<title></title>
<style>
body { font: 13px/normal arial; }
table, form { margin: 10px; }
th, td { border: 1px solid #aaa; padding: 2px 6px; }
th { background: #eee; }
#inputHtml { width: 250px; }
</style>
@nateps
nateps / gist:1172490
Created Aug 26, 2011
Hide the address bar in a fullscreen iPhone or Android web app
View gist:1172490
<!DOCTYPE html>
<meta charset=utf-8>
<meta name=viewport content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name=apple-mobile-web-app-capable content=yes>
<meta name=apple-mobile-web-app-status-bar-style content=black>
<title>Test fullscreen</title>
<style>
html, body {
margin: 0;
padding: 0;
You can’t perform that action at this time.