Skip to content

Instantly share code, notes, and snippets.

View bortunac's full-sized avatar
💭
I may be slow to respond.

bortunac

💭
I may be slow to respond.
View GitHub Profile
@nwjlyons
nwjlyons / email.sh
Last active November 6, 2023 21:12
Send plain and html email via telnet.
telnet 0.0.0.0 1025
Trying 0.0.0.0...
Connected to 0.0.0.0.
Escape character is '^]'.
220 mailhog.example ESMTP MailHog
helo localhost
250 Hello localhost
mail from: <neil@example.com>
250 Sender neil@example.com ok
rcpt to: <lisa@example.com>
@niieani
niieani / throttle-and-debounce.sh
Last active December 11, 2023 15:39
throttle and debounce commands in bash
#!/usr/bin/env bash
declare -i last_called=0
declare -i throttle_by=2
@throttle() {
local -i now=$(date +%s)
if (($now - $last_called >= $throttle_by))
then
"$@"
@mralexjuarez
mralexjuarez / Lsyncd Technical Session.md
Last active May 29, 2024 12:18
Quick Tutorial on Using Lsyncd

Lsyncd Technical Session

So what is lsyncd?

Lsyncd is a tool used to keep a source directory in sync with other local or remote directories. It is a solution suited keeping directories in sync by batch processing changes over to the synced directories.

When would we use lsyncd?

So the generic use case is to keep a source directory in sync with one or more local and remote directories.

@rtgibbons
rtgibbons / VBoxReloadKext.sh
Created March 12, 2012 19:51 — forked from timdream/VBoxReloadKext.sh
Script: reload VirtualBox kernel extension in Mac OS X
#!/bin/bash
unload() {
kextstat | grep "org.virtualbox.kext.VBoxUSB" > /dev/null 2>&1 && sudo kextunload -b org.virtualbox.kext.VBoxUSB
kextstat | grep "org.virtualbox.kext.VBoxNetFlt" > /dev/null 2>&1 && sudo kextunload -b org.virtualbox.kext.VBoxNetFlt
kextstat | grep "org.virtualbox.kext.VBoxNetAdp" > /dev/null 2>&1 && sudo kextunload -b org.virtualbox.kext.VBoxNetAdp
kextstat | grep "org.virtualbox.kext.VBoxDrv" > /dev/null 2>&1 && sudo kextunload -b org.virtualbox.kext.VBoxDrv
}
load() {