Skip to content

Instantly share code, notes, and snippets.

@indexzero
indexzero / journey-and-node-static.js
Created November 20, 2010 20:18
An example of using Journey with Node-Static in node.js
var sys = require('sys'),
http = require('http'),
static = require('node-static'),
journey = require('journey');
exports.createRouter = function () {
return new (journey.Router)(function (map) {
//
// Version Binding
anonymous
anonymous / ValidationMixin
Created March 2, 2011 09:49
ValidationMixin for Tornado
#!/usr/bin/env python
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
@mikeyk
mikeyk / redis_session_backend.py
Created April 8, 2011 18:01
A redis backend for Django Sessions, tested on Django 1.3+
from django.contrib.sessions.backends.base import SessionBase, CreateError
from django.conf import settings
from django.utils.encoding import force_unicode
import redis
class SessionStore(SessionBase):
""" Redis store for sessions"""
def __init__(self, session_key=None):
self.redis = redis.Redis(
@niklas
niklas / lxc.rb
Created April 24, 2011 16:44
Setup an lxc-container (chef recipe)
package 'debootstrap'
package 'apt-cacher-ng'
package 'inotify-tools'
include_recipe 'lxc::manage'
include_recipe 'lxc::network_bridge'
include_recipe 'lxc::dns'
host = node[:container]
@napcs
napcs / .tmux.clipboard
Created August 15, 2011 19:28
My tmux config
# configuration for osx clipboard support
set-option -g default-command "reattach-to-user-namespace -l sh"
@vvuksan
vvuksan / README
Created August 16, 2011 22:01
LXC (Linux Containers Installation)
This works under Ubuntu 10.10. I tried under 10.04 LTS but the Ubuntu templates are not there. Investigating.
[ Leaving this link here for reference in case I need to do apt-get upgrade. @ohloh recommends it
http://sourceforge.net/mailarchive/message.php?msg_id=26885493 ]
To make things easy have libvirt installed ie.
sudo apt-get install libvirt-bin
Otherwise you will need to set up bridges, iptables, dnsmasq.
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 19, 2024 20:54
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active July 7, 2024 19:32
A badass list of frontend development resources I collected over time.
$ cat /media/state/units/docker-local.service
[Service]
Type=simple
ExecStartPre=/bin/systemctl kill docker.service
ExecStartPre=/bin/mount --make-rprivate /
# Enable forwarding to allow NAT to work
# TODO: Move this to sysctl.conf
ExecStartPre=/sbin/sysctl -w net.ipv4.ip_forward=1
# Try to use this alternate way of starting docker if docker crashes for you: