Skip to content

Instantly share code, notes, and snippets.

View somian's full-sized avatar

Sören Andersen somian

  • toolsmith, independent contractor: python, perl, unix shell; systems admin
  • A city near the eastern Great Lakes, USA
View GitHub Profile
@somian
somian / backup-cygperl.sh
Created October 22, 2025 22:10
Script using cpio to copy site_perl library to a backup medium
#!/bin/bash
# Last modified: Wed Oct 22 2025 05:48:03 PM -04:00 [EDT]
read -t 10 -iY -p "Do you wish to do this backup operation? (Y/n): " DECISION
if [[ ${DECISION,,} == "y" ]]; then printf "Will do the %s on %s\n" cpio-op \
"/usr/local/share/perl5/site_perl/5.40"
DECISION=""
sleep 4 # gives us a second chance to change our mind
find /usr/local/share/perl5/site_perl/5.40 |
cpio -p -d -B --dot --quiet --force-local --reset-access-time \
@somian
somian / lmde-ISO-mirrorSelect.sh
Created October 12, 2025 01:39
*sh Script for determining fastest mirror for downloading LMDE ISOs
#!/bin/bash
# Last modified: Sat Oct 11 2025 12:39:33 PM -04:00 [EDT]
# List of potential LMDE mirror base URLs. /-* World & US mirrors *-/
MIRROR_LIST=(
"https://mirrors.cicku.me/linuxmint/iso/debian/"
"https://pub.linuxmint.io/debian/"
"https://mirror.rackspace.com/linuxmint/iso/debian/"
"https://mirror.clarkson.edu/linuxmint-images/debian/"
"https://mirror.fcix.net/linuxmint-images/debian/"
@somian
somian / create-modulino.pl
Created September 28, 2025 00:35
create-modulino.pl - a short perl script by perl coder and CPAN author Robert Lauer (BIGFOOT)
#!/usr/bin/env perl
use strict;
use warnings;
use File::Which qw(which);
use File::Copy;
use File::Basename qw(dirname);
use Data::Dumper;
use Getopt::Long;
@somian
somian / diamond-farsight.txt
Created December 5, 2015 18:28
CULTIVATE A NEW COMMON SENSE - MY-DFI-AMERICA
Buddhism is so tremendously farsighted and profound a religion that, externally, it is difficult to grasp its true message. People with little understanding of Buddhism can no more discern its value than a child can understand the real value of a diamond. However, please be confident that the develpment of human wisdom will prodce and increasing body of evidence ponting to the greatness of Buddhism.
p11 CULTIVATE A NEW COMMON SENSE - MY-DFI-AMERICA
@somian
somian / LoadUserXmap.py
Created October 11, 2015 20:50
xkb configuration is too complicated - xmodmap script
#!/usr/bin/env python
# Adapted from Andrey Tataranovich script www.tataranovich.com/public/scripts/xkbmapd.py
# to load the user .Xmodmap file on 1) start, 2) resume and 3) layout switch
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
@somian
somian / rapido-por-favor.sh
Last active September 10, 2015 10:55
Seeking source pks for Perl mods
**SAMPLE DATA**
'ftp://debian.osuosl.org/debian/pool/main/libi/libio-pager-perl/libio-pager-perl_0.31-1.dsc' libio-pager-perl_0.31-1.dsc 2172 MD5Sum:cc0a1cf20db9392ee2aff6b1906a022e
'ftp://debian.osuosl.org/debian/pool/main/libi/libio-pager-perl/libio-pager-perl_0.31.orig.tar.gz' libio-pager-perl_0.31.orig.tar.gz 15406 MD5Sum:727579dccdda96cfcadbba9def8af59f
'ftp://debian.osuosl.org/debian/pool/main/libi/libio-pager-perl/libio-pager-perl_0.31-1.debian.tar.xz' libio-pager-perl_0.31-1.debian.tar.xz 1556 MD5Sum:b493791b1c60db8d1715be81baaf8484
@somian
somian / NetWhere.bash.sh
Created September 6, 2015 05:40
What works for me Get IP assigned to wlan0 on LinuxMint
Wlan_ip () {
# Get ip assigned to wlan0 interface if it is up.
nmcli --pretty con status uuid 'ac868f68-fd04-41c2-ac0e-2ff40fd71b7c' |
cut -d ':' -f2 |
awk '/ip_address/{print $3}' |tee /tmp/w0ip
}
NetWhere () {
case "$(nmcli --terse --fields device,state dev status|grep --color=never wlan0)" in
@somian
somian / ShAss.md
Last active May 1, 2016 16:46
Annoyware experience: ShoppingAssistant

Google Chrome on GNU/Linux infected by extension

Probably "YouTube Video Downloader for Crome" or "Chrome YouTube Downloader"

It is freeware (free as in "a filthy beer bottle with drowned insects inside") I removed this as soon as I identified it as the probable culprit -- and so far, no more Shopping Assistant.

The odd thing is that Shopping Assistant only activated upon visiting certain sites and, amazingly, a site for a local Indian Restaurant (India Jewel in Kenmore NY) seems to be one (hacked server?)

@somian
somian / OneShotSet.ps1
Created March 20, 2015 07:48
PS launcher for Vim (on Wyhnnows) that finds alternate personal rcfile location
# /Call it OneShotSet.ps1 if you want/
Push-Location
Set-Location HKCU:\Console
New-Item '.\%SystemRoot%_system32_WindowsPowerShell_v1.0_powershell.exe'
Set-Location '.\%SystemRoot%_system32_WindowsPowerShell_v1.0_powershell.exe'
# Not working to change after the initial setup ...
## midnightblue -ish behind light gold
New-ItemProperty . ColorTable00 -type DWORD -value 0x00281100
New-ItemProperty . ColorTable07 -type DWORD -value 0x004895c5
New-ItemProperty . FaceName -type STRING -value "Lucida Console"
@somian
somian / CallerScript.cmd
Last active August 29, 2015 14:17
Problem with output
@ECHO OFF
:: Use PS to split env PATH into separated pathelements
:: Run test in Vim :!%:p:h:8/%:r.%:e
POWERshell -File .\Tighties.ps1
:EOF