Skip to content

Instantly share code, notes, and snippets.

View tessus's full-sized avatar
💭
Lost in time...

Helmut K. C. Tessarek tessus

💭
Lost in time...
View GitHub Profile
@tessus
tessus / .tmux.conf
Last active March 22, 2018 21:42
tmux config file
#---------------------------------------------------------------------------#
# .tmux.conf
# Helmut K. C. Tessarek, Last update 2018-03-22
#---------------------------------------------------------------------------#
#---------------------------------------------------------------------------#
# set prefix key to ctrl+a / ctrl-b is used in vi for going back one page
#---------------------------------------------------------------------------#
unbind C-b
set -g prefix C-a
@tessus
tessus / teksavvy_usage.py
Created July 31, 2014 05:40
retrieve TekSavvy data usage via API key
#!/opt/local/bin/python
import httplib, json
APIKEY = "YOUR_API_KEY_HERE"
headers = {"TekSavvy-APIKey": APIKEY}
conn = httplib.HTTPSConnection("api.teksavvy.com")
conn.request('GET', '/web/Usage/UsageSummaryRecords?$filter=IsCurrent%20eq%20true', '', headers)
response = conn.getresponse()
@tessus
tessus / stc.py
Last active July 19, 2017 13:21
Epoch Converter in Python
#!/usr/bin/python
import time, argparse
def convert(ctx):
inputstr = str(ctx.Epoch)
if len(inputstr) > 10:
secs = inputstr[:10]
msecs = inputstr[10:]
@tessus
tessus / compile_tmux.sh
Last active January 25, 2024 23:37
compile tmux (static)
#!/bin/bash
TMUX_VERSION=2.3
NCURSES_VERSION=6.0
LIBEVENT_VERSION=2.0.22
BASEDIR=${HOME}/work/tmux-static
TMUXTARGET=${BASEDIR}/local
mkdir -p $TMUXTARGET
cd $BASEDIR

Keybase proof

I hereby claim:

  • I am tessus on github.
  • I am tessus (https://keybase.io/tessus) on keybase.
  • I have a public key ASDJ5NTbpDfLF5-wamLigllO_B_G1ZR3O7PBaDv0tnwdjAo

To claim this, I am signing this object:

@tessus
tessus / YubiKey-GPG-SSH-guide.md
Created March 23, 2018 00:38 — forked from ageis/YubiKey-GPG-SSH-guide.md
Technical guide for using YubiKey series 4 for GPG and SSH

YubiKey 4 series GPG and SSH setup guide

Written for fairly adept technical users, preferably of Debian GNU/Linux, not for absolute beginners.

You'll probably be working with a single smartcard, so you'll want only one primary key (1. Sign & Certify) and two associated subkeys (2. Encrypt, 3. Authenticate).

@tessus
tessus / fzf_git.sh
Last active February 11, 2020 21:24 — forked from junegunn/functions.sh
Key bindings for git with fzf (https://junegunn.kr/2016/07/fzf-git/)
# GIT heart FZF
# -------------
is_in_git_repo() {
git rev-parse HEAD > /dev/null 2>&1
}
# Only for interactive bash session
if [[ $- =~ i ]];then
@tessus
tessus / opnsense_check.py
Last active October 18, 2022 15:33
opnsense_check: check via API call, if OPNsense update/upgrade is available
#!/usr/bin/env python3
###################################################################
# This script makes an API connection to OPNsense #
# and checks if there are any pending updates #
# if there are, it sends an email with details #
# #
# Authors: Bart J. Smit, 'ObecalpEffect' and Franco Fichtner #
# Helmut K. C. Tessarek #
# #