This file contains hidden or 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/bash | |
HOST=$(hostname) | |
FQDN=$(hostname -f) | |
1>&2 echo "REMINDER: add additional SPNs by listing each as an additional argument." | |
if [ x = x"$FQDN" ] || [ "${FQDN%%.*}" != "$HOST" ] || [ "$HOST" = "$FQDN" ];then | |
( | |
exec 1>&2 |
This file contains hidden or 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/bash | |
### expects gzip, jq, and tar | |
### converts an image downloaded with the moby image download script into a rootfs.tar.gz file. | |
### get the moby script from https://github.com/moby/moby/blob/master/contrib/download-frozen-image-v2.sh | |
set -x | |
ROOT="$1" |
This file contains hidden or 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
const puppeteer = require('puppeteer'); | |
const uuid = require('uuid'); | |
const sleep = ms => new Promise(r => setTimeout(r, ms)); | |
(async () => { | |
const browser = await puppeteer.launch({ headless: false }); | |
const page = await browser.newPage(); | |
const id = uuid.v4(); |
This file contains hidden or 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
diagram: | |
fill: "snow" | |
columns: 21 | |
rows: 21 | |
gridLines: false | |
gridPaddingInner: .25 | |
groupPadding: .75 | |
title: | |
color: black | |
heightPercentage: 6 |
This file contains hidden or 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
docker run -v /var/run/docker.sock:/var/run/docker.sock -v /var/run/docker.sock.virtual:/var/run/docker.sock.virtual -ti alpine/socat unix-listen:/var/run/docker.sock.virtual/1001,fork,user=1000,group=1001 unix-connect:/var/run/docker.sock |
This file contains hidden or 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
perl -MSocket -e 'print inet_ntoa(inet_aton("strudelline.net")), "\n"' |
This file contains hidden or 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
### Keybase proof | |
I hereby claim: | |
* I am jamesandariese on github. | |
* I am caddr (https://keybase.io/caddr) on keybase. | |
* I have a public key ASCvE00c-qOi843z6KU8Zxrsgjq0jar1BWEntzCj4TGdnAo | |
To claim this, I am signing this object: |
This file contains hidden or 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
-- lazy evaluation lets you make mutually recursive definitions | |
-- a prime is a number whose only factor is itself | |
isPrime :: Integer -> Bool | |
isPrime 0 = False | |
isPrime 1 = False | |
isPrime 2 = True | |
isPrime n = head (factors n) == n | |
-- the factors of a number are all the prime numbers that make it up |
This file contains hidden or 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
# put version in VERSION file. this will increment the minor version automatically. | |
VERSION=`((tr '.' ' ' < VERSION ; echo 1+f) | dc;echo f) | dc | paste -s -d . -` | |
echo $VERSION > VERSION |
This file contains hidden or 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
-- Return a list of strings of fizzbuzz from [1..] | |
fizzbuzz :: [[Char]] | |
fizzbuzz = fizzbuzz' 1 | |
where | |
fizzbuzz' n = | |
fizzbuzzer : (fizzbuzz' (n + 1)) | |
where fizzbuzzer | |
| fb3 = "Fizz" | |
| fb5 = "Buzz" | |
| fb3 && fb5 = "FizzBuzz" |
NewerOlder