Skip to content

Instantly share code, notes, and snippets.

View whnr's full-sized avatar
🔋

whnr

🔋
View GitHub Profile
@whnr
whnr / detect_language.py
Created February 20, 2019 22:28
Combination of language detection (with python package langdetect) and aspell for mutt. To autochoose the right dictionary when spellcheking.
#!/usr/bin/python
from langdetect import detect, detect_langs
from sys import stdin
import argparse
parser = argparse.ArgumentParser(description="Detect the most likely language of a text. Returns a two letter language code")
parser.add_argument('-f', '--file', help="File to be checked, otherwise stdin is used")
# For the future if my pull-request is merged. A limitation to 2 langugages improves speed by a factor of 10.
# parser.add_argument('-l', '--lang', nargs='*', help="List of languages to be checked. If ommitted, all languages are checked.")
@whnr
whnr / pomodoro
Created June 30, 2015 10:33
Terminal Pomodoro Timer (OSX) Bash Script
#!/bin/bash
#
# Small Pomodoro Timer
# Based on https://en.wikipedia.org/wiki/Pomodoro_Technique
# Requires terminal-notifier for OSX
# Author: [email protected]
# All times in minutes
work=30;
break_small=5;

tmux shortcuts & cheatsheet

Basic call from terminal:

tmux                           start new
tmux new -s myname             start new with session name:
tmux a  #                      attach (or at, or attach)
tmux a -t myname               attach to named
tmux ls                        list sessions

tmux kill-session -t myname kill session