Skip to content

Instantly share code, notes, and snippets.

@kconragan
kconragan / gist:2690877
Created May 14, 2012 00:14
Example of using connect-mongo for session management with a single db
app.use(express.session({
secret:'awesome unicorns',
maxAge: new Date(Date.now() + 3600000),
store: new MongoStore({
db:mongoose.connection.db},
function(err){
console.log(err || 'connect-mongodb setup ok');
})
}));
@kconragan
kconragan / dabblet.css
Created April 26, 2012 17:51
Subtle CSS hatch pattern
body {
background-color:#f1f2f3;
background-image:
linear-gradient(rgba(0,0,0,.015) 1px, transparent 1px),
linear-gradient(0, rgba(0,0,0,.015) 1px, transparent 1px);
background-size:5px 5px;
background-position:-1px -1px, -1px -1px
}
@kconragan
kconragan / keyrepeat.shell
Last active December 4, 2023 03:40
Enable key repeat in Apple Lion for Sublime Text in Vim mode
# Mac OS X Lion introduced a new, iOS-like context menu when you press and hold a key
# that enables you to choose a character from a menu of options. If you are on Lion
# try it by pressing and holding down 'e' in any app that uses the default NSTextField
# for input.
#
# It's a nice feature and continues the blending of Mac OS X and iOS features. However,
# it's a nightmare to deal with in Sublime Text if you're running Vintage (Vim) mode,
# as it means you cannot press and hold h/j/k/l to move through your file. You have
# to repeatedly press the keys to navigate.