I hereby claim:
- I am blackthornyugen on github.
- I am jsteel (https://keybase.io/jsteel) on keybase.
- I have a public key ASA1ffbhLmYVYTKVx-KYty8AdQ0RGwTFlXgAqCb2en7iego
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #include <cstdio> | |
| #include <iostream> | |
| #include <vector> | |
| static const int BUFFER_READ_SIZE = 8; | |
| static const int MAX_READ_SIZE = 4 * 1024 * 1024; // 4MiB | |
| int main() { | |
| std::vector<char> echoData; | |
| char stdinBuffer[BUFFER_READ_SIZE]; |
| #!/usr/bin/env bash | |
| set -e | |
| DEFAULT_SUBJECT_PREFIX=${DEFAULT_SUBJECT_PREFIX:-"/C=CA/ST=Ontario/L=Kitchener/O=jskw"} | |
| DEFAULT_KEY_TYPE="${DEFAULT_KEY_TYPE:-ec:prime256v1.pem}" | |
| openssl ecparam -name prime256v1 > prime256v1.pem | |
| log() { | |
| # cowsay if available | |
| if which cowsay > /dev/null ; then | |
| echo "" |
| #!/usr/bin/env bash | |
| # | |
| # Create container with the following command: | |
| docker run \ | |
| -d \ | |
| -e TZ=America/Toronto \ | |
| -v $PWD/data:/home/node/.webthings \ | |
| --log-opt max-size=1m \ | |
| --log-opt max-file=10 \ |
| #!/usr/bin/env bash | |
| set -e | |
| DAYS_BEFORE_EMAIL=21 | |
| TO_ADDR="Joe <[email protected]>" | |
| BCC_ADDR="Demo <[email protected]>" | |
| find ~/.acme.sh -name '*cer' | tee certs_to_check.txt | |
| # usage $0 {NEW_CERT} {OLD_CERT} |
| # https://adventofcode.com/2020/day/2 part 2 in jq | |
| # Invoked with jq --raw-input --slurp --from-file aoc2.jq input.2.txt | |
| # x ^ y | |
| def xor($x;$y): | |
| ($x or $y) # Either $x or $y | |
| and # but | |
| ($x and $y | not) # not both | |
| ; |
| # Make a neato jq filter that just gives us question and answer sections. | |
| JQ_FILTER='.[].message.response_message_data | [.QUESTION_SECTION[], ( .ANSWER_SECTION[]? | split(" ")[-1])]' | |
| # What are my name servers for each of these? | |
| for domain in jskw jsteel jsteelkw ; do for tld in ca dev ; do dig ${domain}.${tld} +yaml -tns | yq $JQ_FILTER ; done ; done # SHOW NS | |
| [ | |
| "jskw.ca. IN NS", | |
| "ns-cloud-c4.googledomains.com.", | |
| "ns-cloud-c3.googledomains.com.", | |
| "ns-cloud-c2.googledomains.com.", |
| #!/usr/bin/env bash | |
| # Need a recent openssl to use -6 option (sha512). Either update openssl or change to -1 or similar if it doesn't work | |
| shuf -n30 /usr/share/dict/words | tr '\n' ' ' | fold -s -w 48 | tr ' ' ';' | openssl passwd -6 -noverify -table -stdin | |
| # Example Output: | |
| #carrotwood;sacerdotalist;unfallible;homeliness; $6$xGj40hGX9L0NyToC$hqPn25jIFzS2vzfEVpsmzbDe3XeXtUkTJPHKBO7SI6FTkub4gqUWq5dpB8wfqkEoQClTmWkuiuN8K8eYIcfXL1 | |
| #schoolteaching;moule;malesherbiaceous; $6$//mFpIknpKEToVt1$cyNLuPOsvPCW5KzJiS86rKKfonl8PBG0B/Xf5bLwiEvdcm64OX0jqwbhIxjOjrTejxUcB0ys.B0kdBLasb8l/. | |
| #hypsophonous;ungroundedness;did;sapek; $6$NA29jYnRwQ1Tstlh$AW0NoJSKXCIiBo86FB9TKmD0aS67fcdtc.x8.VjeGgj287EuREkDWRmh/cxArFs8rGSM5eDPVC0kYyn52DlpX0 | |
| #strepsinema;Thackerayana;camelman; $6$tze4YcdZgPo6e18o$PtsCCwvbkEuvfQoOnPH8ZErQeoGE8/PQvOhdkYioP687ZAujRbtK.IpKLSfVPM6tvsTkN9Z1qjrbssioezG1S. | |
| #amyelencephalia;creeded;city;Triodon;oosporic; $6$Jh/vWDP3BM5Wah/X$CVfCUvFVVXQRBdGPo0x8YiIlLm0mm/4uadaHP39tCITxij8T98HMtVD9khCrVce0D.7AaC1cetiOlX/BF3IG.. |
| /* | |
| * Sending an email using kotlin and Apache Commons Email | |
| * | |
| * Usage: java -jar app.jar <user> <password> <from> <to> <cc> | |
| */ | |
| package main.kotlin.sendmail | |
| import org.apache.commons.mail.Email | |
| import org.apache.commons.mail.EmailException | |
| import org.apache.commons.mail.HtmlEmail |
| #!/usr/bin/env bash | |
| FILTER_YUBIKEY='/Yubikey/{print;getline;getline;print;getline;print}' | |
| EXPECTED_YUBI_MD5="1a067fac7f6915a0acd5a235876fd33e" # Hash of USB Device | |
| LONG_POLL_TIME=3 # Poll time after locking | |
| SHORT_POLL_TIME=1 # Poll time while waiting for yubikey to disconnect | |
| ARMED=0 | |
| DATESTRING=%Y-%m-%d\ %H:%M:%S.000 | |
| do_screen_saver() { | |
| echo "`date \"+${DATESTRING}\"` locking screen" |