This article is now published on my website: Prefer Subshells for Context.
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
"""Simple async crawler/callback queue based on gevent.""" | |
import traceback | |
import logging | |
import httplib2 | |
import gevent |
#!/usr/bin/env python | |
from gevent import monkey | |
monkey.patch_all() | |
import sys | |
import redis | |
import urllib2 | |
import traceback | |
from cgi import escape | |
# -- gsdproxy |
#!/bin/bash | |
# Script for installing tmux on systems where you don't have root access. | |
# tmux will be installed in $HOME/local/bin. | |
# It's assumed that wget and a C/C++ compiler are installed. | |
# exit on error | |
set -e | |
TMUX_VERSION=1.8 |
- Learn to touch type (can be done asynchronously)
- Read Your Problem With Vim is You Don't Grok Vi
;;; rlx.el --- RLX development tools for GNU Emacs | |
;; Copyright (C) 2006, 2007, 2008 David O'Toole | |
;; Author: David O'Toole <[email protected]> | |
;; Keywords: multimedia, games | |
;; Version: 0.81 | |
;; This file is free software; you can redistribute it and/or modify | |
;; it under the terms of the GNU General Public License as published by |
import sys | |
from pyspark.context import SparkContext | |
from numpy import array, random as np_random | |
from sklearn import linear_model as lm | |
from sklearn.base import copy | |
N = 10000 # Number of data points | |
D = 10 # Numer of dimensions | |
ITERATIONS = 5 |
So I have been using tmux for a while and have grown to like it and have since added many many customizations to it. Now once you start getting the hang of it, you'll naturally want to do more with the tool.
Now tmux has a concept of window-group
and session
and if you are like me you'll want multiple session that connects to the same window group instead of a new window group every time. Basically I just need different views into the same set of windows that I have already created, I don't want to create a new set of windows every time I fire up my terminal.
This is the default case if you simply use the tmux
command as your login shell, effectively creating a new group of windows every time you start tmux
.
This is less than ideal because, if you are like me, you fire up one-off terminals all the time and you don't want all those one-off jobs to stay running in the background. Plus sometimes you need information fro
// Usage : less2stylusDir('../src/css/'); | |
var fs = require('fs'); | |
// this less 2 stylus conversion script make a stylus easy to read syntax | |
// - let the braces | |
// - replace the @ for var as $ | |
// - let semicolons | |
function less2stylus(less) |
#optionally create two buckets and serve from root, redirecting www | |
s3cmd mb --bucket-location=EU s3://example.com | |
s3cmd mb --bucket-location=EU s3://www.example.com | |
s3cmd ws-create --ws-index=index.html s3://example.com | |
s3cmd ws-create s3://www.example.com | |
#configure www redirect if necessary | |
wget --mirror -p --html-extension --convert-links -e robots=off -P . http://example.com | |
s3cmd put --recursive --exclude=".DS_Store" --acl-public example.com/ s3://example.com | |
#create hosted zones and redirect DNS |