Skip to content

Instantly share code, notes, and snippets.

@sidusnare
sidusnare / wm.services.sh
Created July 27, 2022 19:08
Walk a daemontools directory and provide controls for them in a WindowMaker menu
#!/bin/bash
echo '"Services" MENU'
if [ ! -e "${HOME}/usr/local/service" ]; then
echo '"No service dir found" EXEC xterm -e ls -l "${HOME}/usr/local/services"'
echo '"Services" END'
exit 0
fi
cd "${HOME}/usr/local/service" || exit 1
for i in *;do
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco feature enable -n allowGlobalConfirmation
choco feature enable -n allowEmptyChecksums
choco config set --name cacheLocation --value ${env:SYSTEMDRIVE}\sidusconfig\cache
$fail = @()
$sucsess = @()
$file = Get-Content -Path "${env:SYSTEMDRIVE}\sidusconfig\first.json" -Raw
$packages = ConvertFrom-Json $file
$file = Get-Content -Path "${env:SYSTEMDRIVE}\sidusconfig\second.json" -Raw
$packages += ConvertFrom-Json $file
@sidusnare
sidusnare / updates_status.sh
Created May 12, 2022 22:42
uses systemctl's ability to show status of a pid to display status of a service that's been updated, can easily be adjusted to restart those updated services
for pid in $( lsof -n | grep -w deleted | grep -E -v ' /dev/shm/| /proc/| /tmp/| /home/| /memfd' | awk '{print($2)}' );do
systemctl status "${pid}"
done
@sidusnare
sidusnare / list.sane.sh
Created March 8, 2022 14:57
Parses SANE's list of scanner support for completely supported scanners and lets you choose which scanner interface to show
#!/bin/bash
for p in lynx grep sed cut;do
if ! command -v "${p}" >> /dev/null 2>> /dev/null ;then
echo "Please install ${p}" >&2
exit 1
fi
done
interface="Ethernet"
INTERFACES=( 'USB' 'IEEE-1394' 'SCSI' 'Parport' 'WiFi' 'Ethernet' 'RS232C' )
@sidusnare
sidusnare / keybase.md
Created November 14, 2019 20:19
keybase.md

Keybase proof

I hereby claim:

  • I am sidusnare on github.
  • I am sidusnare (https://keybase.io/sidusnare) on keybase.
  • I have a public key whose fingerprint is 488F F9DF 0111 F382 0170 894F 06F0 BDAE DBCC A37D

To claim this, I am signing this object:

@sidusnare
sidusnare / rip.loop.sh
Last active April 12, 2019 15:49
Media rip loop
#!/bin/bash
#Copyright (c) 2019 Fred Dinkler IV
#
#This program is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License, version 2, as
#published by the Free Software Foundation.
#
#This program is distributed in the hope that it will be useful,
#but WITHOUT ANY WARRANTY; without even the implied warranty of