Skip to content

Instantly share code, notes, and snippets.

tmux cheatsheet

As configured in my dotfiles.

start new:

tmux

start new with session name:

@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 23, 2024 18:01
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@fabrixxm
fabrixxm / globalkeys.py
Created July 17, 2012 15:15
Windows global hotkeys in a thread
# After "Tim Golden's Python Stuff" code
# http://timgolden.me.uk/python/win32_how_do_i/catch_system_wide_hotkeys.html
#
# After a post to c.l.py by Richie Hindle:
# http://groups.google.com/groups?th=80e876b88fabf6c9
#
import os
import sys
import threading
@igrigorik
igrigorik / links.md
Created August 28, 2012 16:53
HAR Show links & resources
@sturadnidge
sturadnidge / tmux-1.8-on-CentOS-6.x.txt
Last active May 10, 2021 18:31
Install tmux 1.8 on CentOS 6.x minimal (64bit)
# download latest libevent2 and tmux sources, and extract them somewhere
# (thx bluejedi for tip on latest tmux URL)
#
# at the time of writing:
# https://github.com/downloads/libevent/libevent/libevent-2.0.21-stable.tar.gz
# http://sourceforge.net/projects/tmux/files/latest/download?source=files
#
# install deps
yum install gcc kernel-devel make ncurses-devel
@mdavey
mdavey / globalhotkeys.py
Created June 5, 2014 09:51
Global hot keys in Python for Win32
import ctypes
import ctypes.wintypes
import win32con
class GlobalHotKeys(object):
"""
Register a key using the register() method, or using the @register decorator
Use listen() to start the message pump
@rohitkode
rohitkode / vpn.sh
Last active January 19, 2017 12:16
Use openconnect to connect to VPN while allowing internet access (works for wireless interface only)
#/bin/bash
##########################################################################
# Uses openconnect to connect to a VPN gateway and ssh into the specified
# remote host as per the arguments passed to the script, and route internet
# traffic through a default gateway.
# Note: The script assumes internet connectivity on the wireless interface
# "usage: ./vpn <remote_user> <remote_host>"
###########################################################################
@gsherwood
gsherwood / ruleset.xml
Created December 5, 2014 20:06
PSR2 with tabs instead of spaces
<?xml version="1.0"?>
<ruleset name="MyStandard">
<description>PSR2 with tabs instead of spaces.</description>
<arg name="tab-width" value="4"/>
<rule ref="PSR2">
<exclude name="Generic.WhiteSpace.DisallowTabIndent"/>
</rule>
<rule ref="Generic.WhiteSpace.DisallowSpaceIndent"/>
<rule ref="Generic.WhiteSpace.ScopeIndent">
<properties>
@PeterMinin
PeterMinin / calc.py
Last active July 6, 2023 19:30
A command-line calculator with some handy and/or neat features.
#!/usr/bin/python
"""
A command line calculator with the following features:
1) Accepts numbers with any decimal and thousand separators.
2) Uses Decimal when possible, which favors "user-friendliness" of results
over speed of computation.
"""
from __future__ import division, print_function
@robertpainsi
robertpainsi / commit-message-guidelines.md
Last active May 15, 2024 19:48
Commit message guidelines

Commit Message Guidelines

Short (72 chars or less) summary

More detailed explanatory text. Wrap it to 72 characters. The blank
line separating the summary from the body is critical (unless you omit
the body entirely).

Write your commit message in the imperative: "Fix bug" and not "Fixed
bug" or "Fixes bug." This convention matches up with commit messages