As configured in my dotfiles.
start new:
tmux
start new with session name:
As configured in my dotfiles.
start new:
tmux
start new with session name:
// swap the keybindings for paste and paste_and_indent | |
{ "keys": ["super+v"], "command": "paste_and_indent" }, | |
{ "keys": ["super+shift+v"], "command": "paste" } |
#!/usr/bin/env python | |
############################################################################# | |
## | |
## Copyright (C) 2010 Riverbank Computing Limited. | |
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). | |
## All rights reserved. | |
## | |
## This file is part of the examples of PyQt. |
@echo off | |
REM batch script for loading git-bash and the vs tools in the same window | |
REM inspiration: http://www.drrandom.org/post/2011/11/16/Grappling-with-multiple-remotes-in-git-tfs.aspx | |
RME screenshot: https://twitter.com/#!/tim_abell/status/199474387731226624/photo/1 | |
%HOMEDRIVE% | |
cd %HOMEPATH% | |
call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat" x86 | |
echo Use full exe names when running under bash, e.g. "msbuild.exe" | |
echo Loading bash, you may now use git and msbuild in the same console \o/. | |
"C:\Program Files (x86)\Git\bin\sh.exe" --login -i |
from flask import Flask, send_from_directory | |
app = Flask(__name__) | |
@app.route('/base/<path:filename>') | |
def base_static(filename): | |
return send_from_directory(app.root_path + '/../static/', filename) |
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
#!/usr/bin/env python | |
import os | |
import urllib2 | |
import json | |
import subprocess | |
user=None | |
repo=None |
I am no Virgil, but having stumbled my way through Python packaging a few times already, I'm documenting the things I learn as I go here.
To help me learn, I took a survey of the top 15 Python packages on Github along with 12 other commonly referenced packages. I thought... if there are any best
from PyQt4 import QtGui, QtCore | |
class RenderManagement(QtGui.QWidget): | |
def __init__(self): | |
super(RenderManagement, self).__init__() | |
self.v_layout = QtGui.QVBoxLayout(self) | |
# Create 5 dynamic items |