Skip to content

Instantly share code, notes, and snippets.

View henri's full-sized avatar
💭
hacking the mainframe

henri henri

💭
hacking the mainframe
View GitHub Profile
@henri
henri / cinnamon-replace
Last active October 8, 2024 20:22
repalce cinnamon (when it springs a memory leak)
#!/usr/bin/env bash
#
# This script may be used when cinnamon springs
# a memory leak. Running this script will start
# a screen session and run 'cinnamon --replace'
# within this new session.
#
# Presently, this is a script to be run manually.
# perhaps in the future a deamon to keep an eye
# on memory usage would be a good idea.
@henri
henri / 005.start-private-browser-installer.md
Last active July 1, 2025 01:25
start as many instances of a browser as you like (posix compliant)

🔒 SPB (start-private-browser)

Have you wished there was an easy way to interact with the web from your terminal? Maybe like me you feel ready to automate your web surfing from the tranquility of the shell? The bundled SPB fish snippits makes searching for information from the fish shell easy-as!

SPB presents the power to navigate the surging currents of our planets vast digital oceans right at your fingertips. SPB is a deceptivly simple shell script which will rapidly spawn one or more isolated browser sessons.

@henri
henri / 001_rsync_cheatsheet.txt
Last active September 12, 2024 04:14
rsync cheatsheet
# Sometimes when moving files around, you do not have the ability to directly
# preserve permissions, the approach below uses two commands : getfacl and setfacl
# to save and restore permissions once your rsync is compled.
# Alterativly, you can also explore using the fake-super options in rsync.
# The commands below are if you have a small number of files, there are also some
# scripts below to split up larger files in to chunks for batch processing.
# save permissions for a direcotry tree to a file using ACL tools
getfacl --recursive ./ > permissions.data
@henri
henri / usbguard_cheatsheet.txt
Last active September 11, 2024 04:38
usb guard
# monitor (realtime) usbguard
usbguard watch
# perminatly allow USB device
usbguard allow-device --permanent <device-id-number>
@henri
henri / 001.micro_cheat_sheet.txt
Last active July 18, 2024 22:03
micro text editor cheatsheet
# link to plugins :
https://micro-editor.github.io/plugins.html
# open file in readonly mode
micro -readonly on <file_to_open_read_only.txt>
# bindings file :
~/.config/micro/bindings.json
@henri
henri / rdrview-links2
Last active July 15, 2024 22:47
wrapper script for rdrview to use links2
#!/bin/bash
# about : this is a wrapper script which will run links2 (CLI terminal) with rdrview
# a program which will work like reader view on a modern web browser
# more information on links2 : http://links.twibright.com/about.php
# more information on rdview : https://github.com/eafer/rdrview
# configure proxy servers
# export http_proxy="http://host:port"
@henri
henri / 01_wezterm_cheatsheet.txt
Last active November 30, 2024 00:43
wezterm cheat sheet
# pane splitting cli
https://wezfurlong.org/wezterm/cli/cli/split-pane.html
# default pane movement basic (arrow keys)
shift-control-leftarrow
shift-control-rightarrow
shift-control-uparrow
shift-control-downarrow
# get some help with the command line
@henri
henri / yt-rss.bash
Last active March 21, 2025 14:09
From a Youtube user / channel URL find the RSS feed
#!/usr/bin/env bash
#
# About : This script allows you to pass in the URL to a youtube users page as argument one and
# this script will output the RSS feed for the channel / user (simiilar to notifications)
#
# Copyright Henri Shustak 2024
# Licence : GNUGLP 3 later
# https://www.gnu.org/licenses/gpl.html
#
#
@henri
henri / hue_tempature_data_adverages.ruby
Last active November 3, 2024 05:32
hue tempature data adverage script
#!/usr/bin/env ruby
# copyright henri shustak 2024
# released under GNU GPL v3 or later
# this script is designed to provide adverages from the hue tempature sensors
# you can increase or decrease the line count to change the adverage ammount
# reccursivly run the script using the scripts output
lines_array = []
total_value = 0

fish snippits

This gist contines snippits of fish code snippits, functions and usage tips to make swimming with fish a little easier.

spb specific snippits

Many of these fish snippits are specific to SPB (Start Private Browser) a project for starting multiple instances of a web browser.

Below you will also find an installer file and a kick off file. Coping the lines from the kick off file into a terminal will start the installation of the spb fish functions and alias. If you install via the SPB install script and already have the fish shell installed on your system, then during the install you will be prompted to update/install these spb related fish snippits.

With these spb specific fish functions configured. Initating web se