Skip to content

Instantly share code, notes, and snippets.

View LeSpocky's full-sized avatar

Alexander Dahl LeSpocky

View GitHub Profile
@LeSpocky
LeSpocky / bash_colours
Created January 25, 2016 12:40 — forked from ian128K/bash_colours
Shell script colours
## Colours and font styles
## Syntax: echo -e "${FOREGROUND_COLOUR}${BACKGROUND_COLOUR}${STYLE}Hello world!${RESET_ALL}"
# Escape sequence and resets
ESC_SEQ="\x1b["
RESET_ALL="${ESC_SEQ}0m"
RESET_BOLD="${ESC_SEQ}21m"
RESET_UL="${ESC_SEQ}24m"
# Foreground colours
@LeSpocky
LeSpocky / sample_output
Last active June 25, 2020 08:08 — forked from JonathonReinhart/sample_output
Show Ethernet drivers on Linux
% what_eth_drivers.sh
br0 [ac:22:0b:c3:cd:2a]: (up)
docker0 [02:42:6b:bb:b4:67]: (down)
enp3s0 [ac:22:0b:c3:cd:2a]: r8169 (up)
enp5s0 [00:01:02:d8:91:07]: 3c59x (unknown)
enx00e04c6800e5 [00:e0:4c:68:00:e5]: r8152 (down)
lo [00:00:00:00:00:00]: (unknown)
vmnet1 [00:50:56:c0:00:01]: (unknown)
vmnet8 [00:50:56:c0:00:08]: (unknown)
@LeSpocky
LeSpocky / my-gen-msgid.sh
Created March 29, 2023 13:15 — forked from mricon/my-gen-msgid.sh
my-gen-msgid
#!/bin/bash
# This generates lore-friendly message-id headers that are safe, unique, and
# provide better UX for someone using lore to retrieve messages.
#
# Instructions for using with mutt/neomutt:
#
# Save this as ~/bin/my-gen-msgid, then add ~/.mutt-fix-msgid with the following,
# fixing your path to the file:
#
# my_hdr Message-ID: <`/home/user/bin/my-gen-msgid`>
@LeSpocky
LeSpocky / glibc.cmake
Last active October 13, 2023 09:24 — forked from likema/glibc.cmake
CMake macro to detect glibc version by filename.
#[=======================================================================[.rst:
glibc
-----
Check glibc version.
Result variables
^^^^^^^^^^^^^^^^
``GLIBC_VERSION``
glibc version.