Skip to content

Instantly share code, notes, and snippets.

View qtip's full-sized avatar

Daniel Snider qtip

  • Bellevue, WA
View GitHub Profile
@qtip
qtip / btcprice
Last active December 28, 2015 11:29
#!/bin/bash
curl --silent https://coinbase.com/api/v1/prices/spot_rate | jq -r '"1BTC = $" + (.amount | tostring)'
#!/usr/bin/env python
from sh import tmux
curclient = tmux('display-message', p='#{client_tty}').strip()
clients = [line.split(':')[0] for line in tmux('list-clients')]
for client in clients:
if str(client) != str(curclient):
tmux('detach-client', t=client)
#!/usr/bin/env python
from sh import tmux
curwin = tmux('display-message', p='#{window_index}').strip()
windows = [line.split()[0].strip(':') for line in tmux('list-windows')]
for src, dest in zip(windows, range(1, len(windows)+1)):
if str(src) == str(curwin):
curwin = dest
if str(dest) != str(src):
tmux('move-window', s=src, t=dest)
tmux('select-window', t=curwin)
# Copyright 2010 Daniel Snider <qtipkk@gmail.com>
#
"""Django and WSGI ISAPI request handler.
Make a new application pool for each project and have an IIS Application point to a directory
containing either a .wsgi file, or a django project with a settings.py
"""
import sys
from Http.WSGI import RunWSGI
from Http import Env