Skip to content

Instantly share code, notes, and snippets.

% sudo knife configure -i
Password:
Overwrite /Users/sam/.chef/knife.rb? (Y/N) y
Your chef server URL? http://chef.beerbin.intranet
Your client user name? acceptance.beerbin.intranet
Your validation client user name?
Path to a chef repository (or leave blank)? /Users/sam/Documents/Development/ruby/gems/chef/chef-repo
WARN: Creating initial API user...
ERROR: Failed to read the private key /etc/chef/webui.pem: #<Errno::ENOENT: No such file or directory - /etc/chef/webui.pem>, /usr/local/Cellar/ruby-enterprise-edition/2010.01/lib/ruby/gems/1.8/gems/chef-0.8.0/lib/chef/rest.rb:60:in `read'/usr/local/Cellar/ruby-enterprise-edition/2010.01/lib/ruby/gems/1.8/gems/chef-0.8.0/lib/chef/rest.rb:60:in `load_signing_key'/usr/local/Cellar/ruby-enterprise-edition/2010.01/lib/ruby/gems/1.8/gems/chef-0.8.0/lib/chef/rest.rb:49:in `initialize'/usr/local/Cellar/ruby-enterprise-edition/2010.01/lib/ruby/gems/1.8/gems/chef-0.8.0/lib/chef/api_client.rb:231:in `new'/usr/local/Cellar/ruby-enterprise-edition/2010.01/lib/
sub vcl_hash {
set req.hash += req.url;
set req.hash += req.http.host;
set req.http.X-Calc-Hash = "true";
if( req.http.Cookie ~ "JSESSIONID" ) {
set req.http.X-Varnish-Hashed-On =
regsub( req.http.Cookie, "^.*?JSESSIONID=([a-zA-z0-9]{32}\.[a-zA-Z0-9]+)([\s$\n])*.*?$", "\1" );
@dkulchenko
dkulchenko / lxc-ubuntu
Created October 18, 2011 23:22
Script to generate LXC containers for EC2
#!/bin/bash
#
# template script for generating ubuntu natty container for LXC
#
# This script is based on lxc-debian (Daniel Lezcano <daniel.lezcano@free.fr>)
#
# Copyright © 2010 Wilhelm Meier
# Author: Wilhelm Meier <wilhelm.meier@fh-kl.de>
@michaelcontento
michaelcontento / lxc-ubuntu.sh
Created January 3, 2012 20:45 — forked from dkulchenko/lxc-ubuntu
Script to generate LXC containers for EC2
#!/bin/bash
#
# Template script for generating ubuntu container for LXC with the same
# ubuntu relase as the host
#
# This script is based on lxc-debian for EC2 (Daniil Kulchenko <daniil@kulchenko.com>)
# wich itself is based on lxc-debian (Daniel Lezcano <daniel.lezcano@free.fr>)
#
@qrush
qrush / Inconsolata-dz-Powerline.otf
Created January 11, 2012 16:50
vim-powerline patched fonts
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active July 23, 2024 19:59
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@pitch-gist
pitch-gist / gist:2999707
Created June 26, 2012 22:21
HTML: Simple Maintenance Page
<!doctype html>
<title>Site Maintenance</title>
<style>
body { text-align: center; padding: 150px; }
h1 { font-size: 50px; }
body { font: 20px Helvetica, sans-serif; color: #333; }
article { display: block; text-align: left; width: 650px; margin: 0 auto; }
a { color: #dc8100; text-decoration: none; }
a:hover { color: #333; text-decoration: none; }
</style>
@UniIsland
UniIsland / SimpleHTTPServerWithUpload.py
Created August 14, 2012 04:01
Simple Python Http Server with Upload
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
@whitingx
whitingx / meta-tags.md
Created October 5, 2012 16:41 — forked from kevinSuttle/meta-tags.md
Complete List of HTML Meta Tags

Copied from http://code.lancepollard.com/complete-list-of-html-meta-tags/

Basic HTML Meta Tags

<meta charset='UTF-8'>
<meta name='keywords' content='your, tags'>
<meta name='description' content='150 words'>
<meta name='subject' content='your website's subject'>
<meta name='copyright' content='company name'>
@jed
jed / how-to-set-up-stress-free-ssl-on-os-x.md
Last active July 10, 2024 14:35
How to set up stress-free SSL on an OS X development machine

How to set up stress-free SSL on an OS X development machine

One of the best ways to reduce complexity (read: stress) in web development is to minimize the differences between your development and production environments. After being frustrated by attempts to unify the approach to SSL on my local machine and in production, I searched for a workflow that would make the protocol invisible to me between all environments.

Most workflows make the following compromises:

  • Use HTTPS in production but HTTP locally. This is annoying because it makes the environments inconsistent, and the protocol choices leak up into the stack. For example, your web application needs to understand the underlying protocol when using the secure flag for cookies. If you don't get this right, your HTTP development server won't be able to read the cookies it writes, or worse, your HTTPS production server could pass sensitive cookies over an insecure connection.

  • Use production SSL certificates locally. This is annoying