Skip to content

Instantly share code, notes, and snippets.

View mjf's full-sized avatar

Matouš Jan Fialka mjf

View GitHub Profile
@mjf
mjf / humandate
Created July 12, 2011 23:31
Posix shell script to convert between time in human form and seconds
#! /bin/sh
# Posix shell script to convert between time in human form and date
# Copyright (C) 2011 Matous J. Fialka, <http://mjf.cz/>
# Released under the terms of The MIT License
if humantime=`humantime -f $@`
then
date -d "$humantime seconds" '+%F %T'
fi
@eqhmcow
eqhmcow / hfsc-shape.sh
Last active October 22, 2024 13:55
HFSC - linux traffic shaping's best kept secret
#!/bin/bash
# As the "bufferbloat" folks have recently re-discovered and/or more widely
# publicized, congestion avoidance algorithms (such as those found in TCP) do
# a great job of allowing network endpoints to negotiate transfer rates that
# maximize a link's bandwidth usage without unduly penalizing any particular
# stream. This allows bulk transfer streams to use the maximum available
# bandwidth without affecting the latency of non-bulk (e.g. interactive)
# streams.