Skip to content

Instantly share code, notes, and snippets.

(setq uniquify-buffer-name-style 'forward)
(setq uniquify-separator "/")
(setq uniquify-after-kill-buffer-p t)
(setq uniquify-ignore-buffers-re "^\\*")
insert
BS shift alt tab enter space
BS shift ctrl super enter space
@wraithan
wraithan / install.sh
Created April 3, 2011 23:54
shell script to install of my configs from my sync to the system I am on
#!/bin/bash
for config in $(find sync/config/ -maxdepth 1 -mindepth 1); do
target=~/$(basename $config)
[ -h $target ] || ln -s $config $target
done;
var redis = require('redis')
var client = redis.createClient();
while (true) {
client.blpop('testqueue', 100, redis.print)
console.log('Done, NEXT!')
}
// Import libs.
var express = require('express')
var app = express.createServer();
var client = require('redis').createClient();
// setup processing of the body of incoming connections
app.use(express.bodyParser())
// listen on '/' for post requests, store post data in redis queue
app.post('/', function(req, res) {
In [5]: unicode(Stock.objects.filter(box=None).query)
Out[5]: u'SELECT "inventory_stock"."id", "inventory_stock"."created_at", "inventory_stock"."created_by",
"inventory_stock"."updated_at", "inventory_stock"."updated_by", "inventory_stock"."barcode_id",
"inventory_stock"."box_id", "inventory_stock"."cart_id", "inventory_stock"."holder_id",
"inventory_stock"."location_id", "inventory_stock"."pallet_id", "inventory_stock"."parent_stock_id",
"inventory_stock"."pick_claim_id", "inventory_stock"."picker_id", "inventory_stock"."piece_id",
"inventory_stock"."purchase_line_id", "inventory_stock"."stock_transfer_id",
"inventory_stock"."expiration_date", "inventory_stock"."expiration_date_has_day",
"inventory_stock"."lot_number", "inventory_stock"."label_sheet_number", "inventory_stock"."status",
"inventory_stock"."weight" FROM "inventory_stock" LEFT OUTER JOIN "picking_box" ON ("inventory_stock"."box_id"
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml">
<head>
<title>Extract Profile of Google Route Using a Geoprocessor Task</title>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=DioG219lPJG3WTn3zmQqebsjVg" type="text/javascript"></script>
<script src="http://serverapi.arcgisonline.com/jsapi/gmaps/?v=1.6" type="text/javascript" ></script>
<script type="text/javascript">
# Beware! This file is rewritten every time htop exits.
# The parser is also very primitive, and not human-friendly.
# (I know, it's in the todo list).
fields=0 48 17 18 38 39 40 2 46 47 49 1
sort_key=46
sort_direction=1
hide_threads=0
hide_kernel_threads=1
hide_userland_threads=0
shadow_other_users=0
from fabric.api import local, prefix, settings
from contextlib import contextmanager
remote_servers_tmux = 'aquameta'
class TmuxException(Exception):
pass
class Tmux(object):
def __init__(self, session_name, *args, **kwargs):
find \w\w-\d+ unless it is at the end of a url:
example.com/browse/AM-3245 -- No Match
blah blah blah AM-3245 bah -- AM-3245
AM-3245 blah blah -- AM-3245
AM-3245 -- AM-3245
/\b(\w\w-\d+)/ is what I have currently which matches in all of the above cases, instead of not matching on the url.