Skip to content

Instantly share code, notes, and snippets.

@jftuga
jftuga / update_firmware_from_ubuntu_or_debian.md
Last active October 9, 2024 07:00
How to Update Firmware on Ubuntu or Debian
@jftuga
jftuga / Server_Core_App_Compatibility_Feature_on_Demand.md
Last active September 19, 2024 07:12
Windows Server 2022 - Server Core App Compatibility Feature on Demand

I am evaluating Server 2022 and ran across Server Core App Compatibility Feature on Demand (FOD).

Once installed and after a reboot, your Server 2022 Core instance will now be able to run the GUI versions of the following programs:

  • CluAdmin.msc - Cluster Admin
  • colorcpl.exe - Color Management
  • devmgmt.msc - Device Manager
  • diskmgmt.msc - Disk management
  • eventvwr.msc - Event Viewer
  • explorer.exe - File Explorer
@jftuga
jftuga / less.md
Last active August 9, 2024 22:06
Using the LESS environment variable

set LESS environment variable to: -SXIFRs in your .bash_profile or .bashrc:

  • -S: chop lines, side scroll with left/right arrow keys
  • -X: leave contents on screen when less exits
  • -I: ignore case when searching with / or ?
  • -F: quit immediately when the entire file fits in one screen
  • -R: enable colored output
  • -s: squeeze blank lines into a single blank line

useful:

@jftuga
jftuga / a-description.md
Last active August 6, 2024 13:49
Python insert_lines function

File Insertion Utility

This Python utility provides two functions for inserting lines into configuration files:

  • insert_lines
  • regex_insert_lines

These functions allow for precise and flexible modification of text files, particularly useful for updating configuration files in networking and system administration tasks.

  • insert_lines: Inserts specified lines into a file before or after a line that starts with a given string.
@jftuga
jftuga / git-rebase-howto.md
Last active August 5, 2024 02:35
Git Config

first make sure main is update-to-date:

  • git switch main && git pull && git switch -

to make a clean commit history

  • git log --oneline
    • make a title line and a list of critical changes
  • git rebase -i main
    • newest commit is at bottom, ex: line 18
    • for line 1, change to pick

Code Golf Challenge

  • Write a program that counts down from 10 (and can either end at 0|1) -- your choice
  • Prints one number per line
  • Can optionally accept a command-line argument
  • No looping constructs are allowed, such a for and while
  • Make it as short as possible, but still readable
  • Please reply with your own solutions, include the programming language
    • Include instructions on how to compile && run
@jftuga
jftuga / 00_Unison_Configuration.md
Last active June 22, 2024 01:14
Unison Configuration

Cross Platform Unison Setup: One Way, Immutable File Mirroring

  • Server: desktop - a windows PC
  • Client: macbook
  • Unison: version 2.53.5

Concept

I need to run KeePassXC on both my Windows desktop and MacBook. I consider the desktop to be the source of truth. If I want to update an entry, then I will modify KeePassXC only on my Windows box. I am restricting myself to this

@jftuga
jftuga / zsh-prompt.md
Last active June 15, 2024 00:52
My zsh prompt with current working directory, git branch name, and current time
@jftuga
jftuga / MacOS_Terminal.md
Created June 11, 2024 14:53
Change Terminal Transparency in MacOS Sonoma

Change Terminal Transparency in MacOS Sonoma

This setting has recently changed so YMMV

  • Terminal -> Settings
  • Text tab
  • Background -> click on the box to the left of Color & Effects
    • There is no button, just click on it.
  • Slide Opacity to 100%
@jftuga
jftuga / goreleaser_homebrew.md
Created June 10, 2024 11:40
GoReleaser and Homebrew setup

CONFIGURING GORELEASER TO BUILD HOMEBREW BINARIES

In .github/workflows/release.yml file:

      - name: run GoReleaser
        uses: goreleaser/goreleaser-action@v6
        env:
 HOMEBREW_TOKEN: ${{ secrets.HOMEBREW_TOKEN }}