Skip to content

Instantly share code, notes, and snippets.

#md5 of last 100MB of all files in current directory
find ./ -type f -print0 -maxdepth 1 | xargs -0 -n1 -I{} sh -c "echo '{}' >> output.md5 && tail -c 100000000 '{}' | md5sum >> output.md5"
@jomix
jomix / setup_dhcp_instructions
Last active December 28, 2019 11:55
Access Diskstation from Raspberry Pi (or How to set up dhcpd on raspi eth)
Raspberry Pi has wlan (wireless) and eth0 (ethernet) network interfaces
The following will set 10.0.0.1 IP to eth0
The diskstation should typically get assigned 10.0.0.10 from dhcp
# assign a static address to eth0
sudo vim /etc/dhcpcd.conf
interface eth0
static ip_address=10.0.0.1/24
@jomix
jomix / aes.go
Created February 14, 2018 08:54
Decrypting something encrypted with OpenSSL passphrase in Golang
//https://dequeue.blogspot.com.au/2014/11/decrypting-something-encrypted-with.html
package main
import (
"crypto/aes"
"crypto/cipher"
"crypto/md5"
"encoding/base64"
"fmt"