Based on https://busylog.net/telnet-imap-commands-note/
- -k -- don't verify certificate (optional)
- -n -- use .netrc for username and password (optional)
- -X -- request to send to server
def duffs_device(frm, count): | |
""" | |
Implement Duff's Device for copying frm in a loop-unrolled fashion. | |
:param frm: List or array-like object to copy frm | |
:param count: Number of elements to copy | |
""" | |
# Ensure we have at least one element to copy | |
if count <= 0: |
#!/bin/sh | |
# Add to crontab | |
# @hourly sleep $((RANDOM \% 1800)) && expire_bruteforce.sh > /dev/null | |
result=$(pfctl -t bruteforce -T expire 86400 2>&1) | |
count=$(echo $result | cut -d '/' -f 1) | |
if [ ${count:-0} -gt 0 ] ; then | |
echo $result |
;;; vc-rcs.el --- support for RCS version-control -*- lexical-binding:t -*- | |
;; Copyright (C) 1992-2017 Free Software Foundation, Inc. | |
;; Author: FSF (see vc.el for full credits) | |
;; Maintainer: Andre Spiegel <[email protected]> | |
;; Package: vc | |
;; This file is part of GNU Emacs. |
Based on https://busylog.net/telnet-imap-commands-note/
#!/bin/sh | |
# | |
# Copyright (c) 2017, 2019 Aaron Poffenberger <[email protected]> | |
# | |
# Permission to use, copy, modify, and distribute this software for any | |
# purpose with or without fee is hereby granted, provided that the above | |
# copyright notice and this permission notice appear in all copies. | |
# | |
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES |
#!/bin/sh | |
# For folks who will type `curl $URL | bash` without considering the consequences. | |
# A quick way to install OpenBSD | |
# BTW, I haven't tested this | |
echo "apt-get install curl && curl -L http://ftp.openbsd.org/pub/OpenBSD/6.2/`uname -m`/install62.fs | dd of=/dev/sda && shutdown -r" |
#!/bin/sh | |
# count hard links in a directory | |
# blech -- includes current and present dir | |
# ls -laRi | cut -d ' ' -f 1 | egrep '^[0-9]+' | sort | uniq -cd | sort -n | |
# better -A excludes . and .. | |
# ls -lARi | cut -d ' ' -f 1 | egrep '^[0-9]+' | sort | uniq -cd | sort -n |
#!/bin/sh | |
if=$1 | |
MUTEX=/tmp/network_config.$if | |
if [ -f $MUTEX ] | |
then | |
echo "Wireless config for $if already in progress" | |
exit |
#!/bin/sh | |
nic="$1" | |
function getNwid { | |
ifconfig $1 | grep ieee80211 | cut -d : -f 2 | rev | cut -d ' ' -f 5- | rev | cut -d ' ' -f 3- | tr -d '"' | |
} | |
if [ ${nic:-empty} = empty ] | |
then |