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
@fishd72
fishd72 / TerminalFun.md
Last active July 29, 2022 12:16
Installing lolcat and fortune on Steam Deck

Installing lolcat and fortune on Steam Deck

... for fun and profit ?!

The Steam Deck is great, I'm less than 24 hours in but already loving it. It does have a few quirks compared to a standard Windows or Linux machine though... it has an immutable filesystem... meaning you can't just install packages using pacman as you normally would, and while you can switch this off temporarily to install things, these changes will likely be overwritten during the next software update cycle.

To work around this, I've found versions of lolcat and fortune that are written in python and installed in the /home/deck folder, which should survive any OS updates. Credit for both these tools goes to the original authors:

  1. Install pip using python3 -m ensurepip
@fishd72
fishd72 / Manifesto.txt
Created July 12, 2022 21:06 — forked from macprince/Manifesto.txt
My IT Manifesto
I will work with you to figure out what the thing is that you need,
I will get the thing ordered for you,
I will unbox the thing and set it up for you,
I will help you get started using the thing,
I will maintain the thing in proper working order for you,
I will troubleshoot the thing for you,
I will fix the thing for you (if I can, or find someone who can if I can't),
I will properly dispose of the thing for you when it's no longer useful,
I will replace the thing with another, possibly better thing when the time comes.
@fishd72
fishd72 / nord.css
Created June 23, 2022 19:37
First draft of a Nord theme for the ModernDeck app.
/*
nord.css
Copyright (c) 2022 dangered wolf, et al
Released under the MIT License
*/
:root {
--primaryColor:#3b4252;
--mdlPrimaryColor:var(--primaryColor);

Setting up Ansible on macOS

  1. Install virtualenv
    pip3 install virtualenv
  2. Create virtualenv directory
    python3 -m virtualenv ansible
  3. Activate virtualenv environment
    source ansible/bin/activate
  4. Install python requirements
    pip3 install passlib bcrypt stormSSH
Install SSHPASS
curl -O -L http://downloads.sourceforge.net/project/sshpass/sshpass/1.08/sshpass-1.08.tar.gz && tar xvzf sshpass-1.08.tar.gz
cd sshpass-1.08
./configure
make
sudo make install
Install SHELLCHECK
https://github.com/koalaman/shellcheck/releases
@fishd72
fishd72 / docker-compose.yml
Last active July 1, 2020 10:07
Self-contained Jamf Pro app, DB & DP within Docker... works on ARM64 too!
version: '3.4'
services:
mysql:
container_name: jamf_mysql
image: "mariadb:latest"
networks:
- default
ports:
- "3306:3306"
@fishd72
fishd72 / random_sn
Created May 28, 2020 11:53 — forked from smashism/random_sn
random_sn
randomsn() {
python -c "import string; from random import randint, sample; print('VM' + ''.join(sample((string.ascii_lowercase + string.digits),10)))"
}
@fishd72
fishd72 / ssh_hostkey.md
Created May 7, 2020 13:53
[SSH Host key management] Managing SSH host keys #ansible #ssh

Messing with SSH Host Keys

Add SSH Host Keys to local known_hosts
ssh-keyscan -H <hostname or IP> >> ~/.ssh/known_hosts

Find SSH Host Keys
ssh-keygen -F <hostname or IP>

Remove SSH Host Keys
ssh-keygen -R \

@fishd72
fishd72 / Logging.sh
Created September 9, 2019 14:38
Bash logging function
# Function to write to the Log file
# Credit to http://linuxadvices.blogspot.com/2013/05/logging-in-bash-nice-subroutine-to-reuse.html
###################################
write_log()
{
while read text
do
LOGTIME=`date "+%Y-%m-%d %H:%M:%S"`
# If log file is not defined, just echo the output
#Show all 3rd party Kernel extensions
sudo /usr/bin/sqlite3 /var/db/SystemPolicyConfiguration/KextPolicy 'SELECT * FROM kext_policy;'
#Strip signing from Config Profile
openssl smime -inform DER -verify -in /path/to/downloaded.mobileconfig -noverify -out /path/to/de-signed.mobileconfig
#Format plist
plutil -convert xml1 /path/to/de-signed.mobileconfig
#Get App signature