Skip to content

Instantly share code, notes, and snippets.

@jftuga
jftuga / git-rebase-howto.md
Last active May 3, 2024 23:58
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
@jftuga
jftuga / debian.md
Last active February 15, 2024 21:32
Debian 12 Packages
@jftuga
jftuga / update_firmware_from_ubuntu_or_debian.md
Last active November 13, 2023 13:16
How to Update Firmware on Ubuntu or Debian
@jftuga
jftuga / less.md
Last active November 1, 2023 13:23
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 / homebrew_packages1.md
Last active October 31, 2023 21:17
Homebrew packages

Must Have

  • brew install bash bat bfs fzf htop jq ripgrep shellcheck tmux ugrep xz

granted

  • brew tap common-fate/granted
  • brew install granted

jenkins-cli

  • TBD
@jftuga
jftuga / big_vs_small.md
Last active September 2, 2023 14:39
Big vs Small

The biggest of the big vs the smallest of the small

Comparing the highlighted sentences in each article

Big

Hercules–Corona Borealis Great Wall

  • The Hercules–Corona Borealis Great Wall or simply the Great Wall is the largest known structure in the observable universe, measuring approximately 10 billion light-years in length (the observable universe is about 93 billion light-years in diameter).

Small

@jftuga
jftuga / update_pihole_block_lists.sh
Created August 26, 2023 18:05
update Pi-hole docker version
#!/bin/bash
IMAGE=pihole
LENGTH=12
LOG="${0%.*}.log"
CONTAINER=$(docker ps --format "{{.ID}}" --filter name=${IMAGE})
if [ "${#CONTAINER}" -ne "${LENGTH}" ] ; then
echo "No running container for image: ${IMAGE}"
exit 1
fi
@jftuga
jftuga / set_outer_border_for_range_xlsx.py
Created May 28, 2021 04:45 — forked from pankaj28843/set_outer_border_for_range_xlsx.py
A simple hack - set outer border for a range using xlsxwriter, a Python library
from __future__ import absolute_import
try:
import cStringIO as StringIO
except ImportError:
import StringIO
# Standard Library
import re
import string
@jftuga
jftuga / creating_aws_lambda_layers_with_python_and_third_party_libraries.md
Last active April 25, 2023 22:34
creating aws lambda layers for python with third party libraries

creating aws lambda layers for python and third party libraries

python versions

  • Python 3.9: use Fedora 34
  • Python 3.10: use Fedora 35

example

# 'python' will be the top-level folder and underneath it, modules will be installed
pip install -t python paramiko

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