honk!
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
<Query Kind="Program"> | |
<Namespace>System.Security.Cryptography</Namespace> | |
<Namespace>LINQPad.Controls</Namespace> | |
<AutoDumpHeading>true</AutoDumpHeading> | |
</Query> | |
DumpContainer results = new(); | |
DumpContainer notice = new(); | |
DumpContainer byteCount = new(); | |
StringBuilder sb = new(); |
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
namespace morse; | |
public enum Morse | |
{ | |
Dot, | |
Dash, | |
Space, | |
WordSeparator, | |
None | |
} |
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
### Keybase proof | |
I hereby claim: | |
* I am benharri on github. | |
* I am bharris (https://keybase.io/bharris) on keybase. | |
* I have a public key ASC-5TnEOCQ1QLf9A9p_sH4_G2VPj20VjXuLQCx4Y9uhwwo | |
To claim this, I am signing this object: |
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/bash | |
rsync -aHxv --numeric-ids \ | |
--exclude=/etc/fstab \ | |
--exclude=/etc/network/* \ | |
--exclude=/proc/* \ | |
--exclude=/tmp/* \ | |
--exclude=/sys/* \ | |
--exclude=/dev/* \ | |
--exclude=/mnt/* \ |
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
#!/usr/bin/env bash | |
ssh tilde.team -- unshadow /etc/passwd /etc/shadow \ | |
| awk -F : '{printf("%s:%s:%s:%s::0:0:%s:%s:%s\n", $1,$2,$3,$4,$5,$6,$7); }' > new_passwd | |
last_user=$(tail -n1 /etc/passwd | cut -f1 -d:) | |
sed -i "" "1,/^${last_user}/d" new_passwd | |
if [[ $(wc -l < new_passwd) -lt 1 ]]; then | |
echo no new users |
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
# on tilde.team as root | |
unshadow /etc/passwd /etc/shadow > linux_passwd | |
cat linux_passwd | awk -F : '{printf("%s:%s:%s:%s::0:0:%s:%s:%s\n", $1,$2,$3,$4,$5,$6,$7); }' > new_passwd | |
# edit new_passwd to include only new users | |
# now on bsd box, switch to root shell | |
scp tilde.team:/root/new_passwd . | |
cat new_passwd >> /etc/master.passwd | |
pwd_mkdb -p /etc/master.passwd |
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/bash | |
ssh tilde.team "awk -F: '($3>=500) && ($3!=65534)' /etc/passwd" > /tmp/passwd.new | |
ssh tilde.team "awk -F: '($3==100) && ($3!=65534)' /etc/group" > /tmp/group.new | |
ssh tilde.team "awk -F: '($3>=500) && ($3!=65534)' /etc/passwd | grep -f - /etc/shadow" > /tmp/shadow.new | |
cat /tmp/passwd.new | awk -F : '{printf("%s:%s:%s:%s::0:0:%s:%s:%s\n", $1,$2,$3,$4,$5,$6,$7); }' > /tmp/masterpasswd.new | |
cat /tmp/passwd.new >> /etc/passwd && sort -u /etc/passwd > /etc/passwd | |
cat /tmp/group.new >> /etc/group && sort -u /etc/group > /etc/group | |
cat /tmp/shadow.new >> /etc/shadow && sort -u /etc/shadow > /etc/shadow |
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
function scr | |
set -l filename ~/Pictures/scr_(date +%s).png | |
maim -s $filename | |
scp $filename thor:pub/screenies/. >/dev/null | |
echo -n "https://bhh.sh/pub/screenies/"(basename $filename) | xclip -selection clipboard | |
xclip -selection clipboard -o | |
end |
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
[Unit] | |
Description=The Lounge IRC client | |
After=thelounge.service | |
[Service] | |
Type=simple | |
ExecStart=/home/ben/workspace/thelounge/index.js start | |
User=ben | |
Group=ben | |
Restart=always |
NewerOlder