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
// prints local development environment information | |
void environs() { | |
#ifdef __clang_major__ | |
printf ("clang detected version %d.%d\n", __clang_major__, __clang_minor__); | |
#endif | |
#ifdef __GNUC__ | |
// note that clang 3.7 declares itself as a gcc 4.2" | |
printf ("gcc detected version %d.%d\n", __GNUC__, __GNUC_MINOR__); | |
#endif |
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
for name in $(nslookup -q=TXT _spf.google.com 8.8.8.8 | grep -oe '_netblocks[1-9]*.google.com'); do nslookup -q=TXT $name 8.8.8.8 | grep -oe '[0-9]*.[0-9]*.[0-9]*.[0-9]/[0-9]*'; done |
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
checksigned() { | |
ZONE=`basename "$1" .`. | |
if [ "$ZONE" = .. ] | |
then | |
ZONE=. | |
fi | |
NAME=`basename "$ZONE" .` | |
NO_NS=true | |
NO_SEC=false | |
OPTS="+cd +noall +answer +nocl +nottl" |
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
# $FreeBSD: releng/11.1/etc/sysctl.conf 112200 2003-03-13 18:43:50Z mux $ | |
# | |
# see https://calomel.org/freebsd_network_tuning.html | |
# https://www.c0ffee.net/blog/freebsd-server-guide | |
# https://en.wikipedia.org/wiki/TCP_tuning | |
# https://en.wikipedia.org/wiki/TCP_window_scale_option | |
# https://en.wikipedia.org/wiki/Bandwidth-delay_product | |
# https://www.freebsd.org/doc/handbook/configtuning-sysctl.html | |
# https://www.freebsd.org/cgi/man.cgi?query=sysctl&sektion=8&manpath=freebsd-release-ports | |
# |
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
seq 20 | parallel -n0 -j2 "curl -X "POST" "https://foo.bar.com/webhooks/doStuff" \ | |
-H 'Accept: application/json' \ | |
-H 'Content-Type: application/json' \ | |
-H 'Authorization: Bearer FOOTOKEN' \ | |
-d $'{ | |
\"stripe_customer_id\": \"blah\", | |
\"api_version\": \"2017-06-05\" | |
}'" |
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
virtio_balloon_load="YES" | |
virtio_blk_load="YES" | |
virtio_load="YES" | |
virtio_pci_load="YES" | |
virtio_scsi_load="YES" | |
virtio_console_load="YES" | |
if_vtnet_load="YES" | |
aesni_load="YES" |
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
# See pf(4) and pf.conf(5) | |
# | |
# | |
# Author: Carlo DiCelico, June 2018 | |
# | |
# Notes: | |
# Required order is options, normalization, queuing, translation, filtering | |
# Translation rules match first, filtering rules match last | |
# Update IPs for your instance and customize rules for your service |
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 roman_to_arabic(roman_numeral): | |
""" | |
Note: Does not support shorthand notation yet! | |
Use IIII instead of IV, VIIII instead of IX, etc. | |
Args: | |
roman_numeral (str): the Roman numeral to convert | |
Returns: | |
int: the number, in Arabic number system | |
""" |
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
/* in routes/fib.js */ | |
var cache = new Array(); | |
function fib(n) { | |
if(n.toString() in cache) | |
return cache[n.toString()]; | |
if(n < 2) { return 1; } |