Skip to content

Instantly share code, notes, and snippets.

View fishd72's full-sized avatar
🏠
Working from home

Dave Fisher fishd72

🏠
Working from home
View GitHub Profile
@cmsj
cmsj / ansible-dropbear-initramfs.md
Last active August 3, 2024 22:12
Ansible to add dropbear (ie an SSH server) to your initramfs, for unlocking encrypted root partitions

This is some Ansible (for Ubuntu 22.04) to install and configure your initramfs to run dropbear (ie an SSH server).

Super handy if you have an encrypted root partition and don't have physical access to the machine to enter the encryption passphrase on the console.

Notes:

  • You'll need to put your actual public SSH keys, instead of the blahblah placeholder I have here
  • I set dropbear to run on port 31337 so the hostkey doesn't clash with the main OS' key in your ~/.ssh/known_hosts
  • This expects to be able to trigger two Ansible handlers when it makes changes, they are listed separately at the bottom
  • You'll need to change the GRUB_CMDLINE_LINUX_DEFAULT line below to have the actual IP/gateway/NIC/hostname you want the kernel to configure
  • After you ssh in when the machine is booting, the command to actually unlock the root filesystem is: cryptroot-unlock

How to install Homebrew package manager on Steam Deck

(See also installing Distroboxm, which is included in SteamOS 3.5 and newer: https://distrobox.it/ )
(See also installing Nix package manager: https://determinate.systems/posts/nix-on-the-steam-deck )

You can install Homebrew (a package manager for macOS and Linux) without disabling the read-only partition with sudo steamos-readonly disable.
The package manager can be used alongside Flatpaks. Some software is only available on Flathub, and some software is only available on Homebrew.

  1. Switch to desktop mode (hold power button until a menu appears, then select "Switch to desktop mode")
  2. Click the logo at the bottom left, go to System, then go to Konsole
@pythoninthegrass
pythoninthegrass / Change Jamf Pro Activation Code.sh
Created December 2, 2020 22:27 — forked from talkingmoose/Change Jamf Pro Activation Code.sh
Programmatic method to change a Jamf Pro server's Activation Code via the Classic API.
#!/bin/bash
# server connection information
URL="https://jss.talkingmoose.net:8443"
userName="JSSAPI-Editor"
password="password"
# XML data to upload
THExml="<activation_code>
<organization_name>Talking Moose Industries</organization_name>
#!/bin/sh
#
# adapted by github.com/smashism
# created 2015-03-12
# last updated 2016-11-07 - change from cocoaDialog to jamfHelper
# uses jamfHelper to display computer information to user
# helpful for troubleshooting if user can't find info themselves
#
# offered AS IS with no warranty or guarantee
@kitzy
kitzy / pound.cfg
Created June 4, 2015 21:39
This is an example pound config for load balancing a JSS
## This is an example pound config for load balancing a JSS
## Created by John Kitzmiller - www.johnkitzmiller.com
######################################################################
## global options:
User "www-data"
Group "www-data"
#RootJail "/chroot/pound"
@wpscholar
wpscholar / vagrant-cheat-sheet.md
Last active November 11, 2024 15:23
Vagrant Cheat Sheet

Typing vagrant from the command line will display a list of all available commands.

Be sure that you are in the same directory as the Vagrantfile when running these commands!

Creating a VM

  • vagrant init -- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.
  • vagrant init <boxpath> -- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64.

Starting a VM

  • vagrant up -- starts vagrant environment (also provisions only on the FIRST vagrant up)
@mzabriskie
mzabriskie / README.md
Last active August 29, 2024 14:03
Check git status of multiple repos

If you're like me you have a dir like ~/Workspace/Github where all your git repos live. I often find myself making a change in a repo, getting side tracked and ending up in another repo, or off doing something else all together. After a while I end up with several repos with modifications. This script helps me pick up where I left off by checking the status of all my repos, instead of having to check each one individually.

Usage:

git-status [directory]

This will run git status on each repo under the directory specified. If called with no directory provided it will default to the current directory.