Skip to content

Instantly share code, notes, and snippets.

View dolmen's full-sized avatar

Olivier Mengué dolmen

View GitHub Profile
dolmen /
Last active March 30, 2024 21:08
# Commands to evaluate impact of xz installed via homebrew.
# Author: Olivier Mengué.
# Show info about xz bottle:
brew info xz
# Upgrade xz:
brew update
dolmen /
Last active December 30, 2023 10:25
Check if your Perl 5 stack is vulnerable to the OpenSSL heartbleed bug

Check if your Perl stack is vulnerable to the OpenSSL « heartbleed » bug.

curl -s | perl
dolmen / GitHub.html
Created November 27, 2023 22:07
How to create an URL shortcut on the Gnome desktop
<meta http-equiv="refresh" content="0; url=" />
dolmen / export-wifi-profiles.cmd
Created March 10, 2011 17:54
Export all Windows Wifi profiles (SSID, password) in XML
:: Run with full administrator rights
netsh wlan export profile folder=. key=clear
dolmen /
Last active March 29, 2023 13:50
How to find my Raspberry Pi IP address?

The MAC address of Raspberry Pi are in B8:27:EB:**:**:**.

# Scan the local network to put IPs in the ARP cache
nmap -sn -n $(route | sed -n '/^[1-9]/{s/ .*$//p;q}')/24 >/dev/null
# Look for Pi' MACs in the arp cache
arp -n | grep -i 'b8:27:eb:'
dolmen /
Last active March 9, 2023 17:47
go-redis v9 migration script

Automated go-redis v8 -> v9 migration

About v8 -> v9


curl | bash
dolmen / kh-to-hashcat.go
Last active January 5, 2023 10:40
Convert OpenSSH known_hosts for hashcat processing
kh-to-hashcat allows to convert an OpenSSH known_hosts hashed file to a
format that can be used with hashcat to recover hosts.
Note that as the know_hosts file usually contains multiple keys for each host
it is wise to filter the file to a single key type to filter redundant hashes.
Check this stat:
perl -nE '$c{$1}++ if /^\|1\|[^ ]+ ([^ ]+)/;END{say "$_: $c{$_}" for keys %c}' ~/.ssh/known_hosts
dolmen /
Last active December 1, 2022 09:00
Go text/template hacks

Go text/template hacks

Hacks below use goproc to experiment with Go templates from the command-line.

Convert bool to int

$ echo false | goproc -e '{{.}} => {{index "....\001\000" (len (print .))}}{{"\n"}}'
false => 0
$ echo true | goproc -e '{{.}} =&gt; {{index "....\001\000" (len (print .))}}{{"\n"}}'
dolmen /
Last active July 13, 2022 05:52


Rebuild the binaries you have built in Go module mode installed in $GOPATH/bin.

Usage: go-bin-upgrade [-n] [-v] bin1 [bin2]...


  • go-bin-upgrade -n godoc
  • (cd ~/go/bin ; go-bin-upgrade * )