Skip to content

Instantly share code, notes, and snippets.

View PaulReiber's full-sized avatar
💭
Inevitable

Paul Reiber PaulReiber

💭
Inevitable
View GitHub Profile
@jamesstidard
jamesstidard / dual_interface.py
Last active September 30, 2016 00:50
Optional asynchronous interface
import asyncio
from functools import wraps
def serializable(f):
@wraps(f)
def wrapper(*args, asynchronous=False, **kwargs):
if asynchronous:
return f(*args, **kwargs)
else:
@PaulReiber
PaulReiber / iomon.py
Last active September 28, 2016 22:44
server io monitoring for Linux in Python
###############################################################################
#
# iomon.py - a simple server io monitor for Linux, in Python, by Paul Reiber
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@infra-0-0
infra-0-0 / dns.py
Last active September 30, 2020 14:47
python3.5 asyncio dns resolver, based on code from who knows where
"""
The most simple DNS client written for Python with asyncio:
* Only A record is support (no CNAME, no AAAA, no MX, etc.)
* Almost no error handling
* Doesn't support fragmented UDP packets (is it possible?)
"""
import asyncio
import logging
@PaulReiber
PaulReiber / pyld.py
Last active August 24, 2016 20:33
Python-based re-implementation of LogDissector.awk
################################################################################
#
# pyld - a python-based derivative of logdissector.awk
#
# Author: Paul Reiber paul@reiber.org
# License: CC BY-SA 4.0
#
# pyld generates derivative data about its input data
# which is often quite useful and revealing.
#
import sys
import termios
import time
import tty
def out(s):
sys.stdout.write(s)
sys.stdout.flush()
def put(x, y, s):

Git Cheat Sheet

Commands

Getting Started

git init

or

@staltz
staltz / introrx.md
Last active March 24, 2026 13:52
The introduction to Reactive Programming you've been missing
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active March 24, 2026 20:12
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname