- haskell-platform
- elm-lang BuildFromSource.hs script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
if=$1 | |
MUTEX=/tmp/network_config.$if | |
if [ -f $MUTEX ] | |
then | |
echo "Wireless config for $if already in progress" | |
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Copyright (c) 2017, 2019 Aaron Poffenberger <akp@hypernote.com> | |
# | |
# 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 |
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
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; 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 <spiegel@gnu.org> | |
;; Package: vc | |
;; This file is part of GNU Emacs. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: |