Skip to content

Instantly share code, notes, and snippets.

@dulldusk
dulldusk / hfsc-shape.sh
Created Jun 14, 2020 — forked from eqhmcow/hfsc-shape.sh
HFSC - linux traffic shaping's best kept secret
View hfsc-shape.sh
#!/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.
@dulldusk
dulldusk / dayornight.py
Created Dec 27, 2018
Script created for use on MotionEyeOs, to change configurations for day and night. https://github.com/ccrisan/motioneyeos
View dayornight.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Script created for use on MotionEyeOs, to change configurations for day and night
# https://github.com/ccrisan/motioneyeos
# Crontab execute every 5 min
# 02,07,12,17,22,27,32,37,42,47,52,57 * * * * /usr/bin/python /data/dayornight.py >> /var/log/dayornight.log
from math import floor, ceil, pi, atan, tan, sin, asin, cos, acos
@dulldusk
dulldusk / skeleton-daemon.sh
Created Oct 5, 2015 — forked from shawnrice/skeleton-daemon.sh
A template to write a quick daemon as a bash script
View skeleton-daemon.sh
#!/bin/sh
# This is a skeleton of a bash daemon. To use for yourself, just set the
# daemonName variable and then enter in the commands to run in the doCommands
# function. Modify the variables just below to fit your preference.
daemonName="DAEMON-NAME"
pidDir="."
pidFile="$pidDir/$daemonName.pid"
You can’t perform that action at this time.