Skip to content

Instantly share code, notes, and snippets.

View Skenvy's full-sized avatar

Nathan Levett Skenvy

View GitHub Profile
@Skenvy
Skenvy / ABOUT.md
Last active November 10, 2022 03:43
Using dependabot's file_fetchers offline

The context for this example is wanting to parse an already existing local clone of a repository, without additional network traffic and without providing configuration to access a potentially private repository, if we already have a clone of it and want to use the functionality that dependabot provides of parsing for the files its ecosystems expect.

This provides an example of how to monkey patch the gem [email protected] to enable the result of the below example that wraps fetcher.files.map(&:name), provided in the file_fetchers README;

puts "Fetched #{fetcher.files.map(&:name)}, at commit SHA-1 '#{fetcher.commit}'"

A quick bundle install should set you up

@Skenvy
Skenvy / README.md
Created March 5, 2022 11:46
Initial Headless Setup with RPi3B+ OS (Buster)

Initial Headless Setup with RPi3B+ OS (Buster)

  1. Download the latest version of Raspberry Pi OS
    • with the caveat that there was a change to camera utility between buster and bullseye.
    • This was tested on an older Buster image
  2. Download the Imager and use it to impact the downloaded zip's .img onto the MicroSD
  3. touch ssh in the boot drive's /, to enable one-time ssh if headless
  4. ssh -vvv [email protected] when connected by ethernet and powered on. (Which includes approving the ECDSA fingerprint)
  5. Enable the ssh server perpetually, rather than the one-time start up.
    • sudo raspi-config, select Interface Options, then select SSH, then confirm with Yes, OK, Finish
  6. Change the [password](https://www.raspberrypi.com/documentation/computers/configuration.html#s
@Skenvy
Skenvy / README.md
Last active January 27, 2025 13:57
SSH+GPG for multiple GH accounts

SSH+GPG for multiple GH accounts

Important

See the SSH section here or jump to GPG below. This is focussed mostly on WSL and Windows side-by-side.

This guide favours having the config for both SSH and GPG stored in Windows and symlinked in to WSL.

Consequentially, it's less intuitive as to how to check-in any of the user config.

Windows can't really handle symlinks, so we would have to check-in the config "as is" as far as it exists in Windows, which, at least for WSL's ~/.ssh which is linked to Windows ~/.ssh, would cause issue on check-out of the config in WSL, trying to apply it on top of this symlink, or fighting for which OS's ~/.git/* has most recently touched those files.