Skip to content

Instantly share code, notes, and snippets.

View craig-m's full-sized avatar
💾

Craig-M craig-m

💾
View GitHub Profile
@craig-m
craig-m / rpi-led-notes.md
Created December 17, 2019 21:42 — forked from taktran/rpi-led-notes.md
Controlling Raspberry Pi 2 LEDs

Commands for controlling the Raspberry Pi 2 LEDs.

See rpi-leds for a node module that does this.

Power (PWR) LED

  • OK (ACT) LED = led0
  • Power (PWR) LED = led1

Allow access

@craig-m
craig-m / 00_README.md
Created December 27, 2022 03:22 — forked from craig-m-unsw/00_README.md
Platform independent way of generating Linux compatible crypt(3) sha512 hashes ($6$ style). For systems (like macOS/OSX) where you can't `mkpasswd -m sha-512`.

Create Linux password hashes from Python

Platform independent way of generating Linux compatible crypt(3) sha512 hashes ($6$ style). For use in cloud-init, preseed files, or altering /etc/shadow. Use on systems where you can't mkpasswd -m sha-512 (which gets installed from sudo apt install whois weirdly on Ubuntu/Deb systems).

setup

We can install Passlib in a virtual environment anywhere we can run Python from with a small script.

So Install Python by downloading or using a package manager (eg sudo apt-get install python3 python3-virtualenv -y).

@craig-m
craig-m / LICENSE.md
Created December 30, 2022 05:27 — forked from sj26/LICENSE.md
Bash retry function

This is free and unencumbered software released into the public domain.

Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.

In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit

@craig-m
craig-m / readme.md
Created January 5, 2023 08:49 — forked from eddiewebb/readme.md
Hugo JS Searching with Fuse.js