Jump to content
  • entries
    17
  • comments
    12
  • views
    8,577

About this blog

mostly OS related stuff, with a mix of programming, scripting,shell,hardware,config related stuff

Linux , Windows (and OsX +more):

tips,tricks and general observations on any hardware,os,software and other it related stuff.

  1. Stuff (Tools, Tricks, Commands Procedures):
    • ... i wish i had come across years ago as it would have made life easier 
    • ... i think everyone knows but proves me wrong everytime
    • ... that is but shouldnt be
    • ... that seems like a nobrainer to me but isnt 
    • ... that fustrates me
  2. Systems, Procedures, Designs
    • ... that are hidden marvels and deserve more attention
    • ... that make no sense or are Idiotic
    • ... that are broken at its core in my opinion
    • ... are poorly tought out and or implemented
    • ... that are Anti Solutions and or Solutions in Name only
  3. Other Rants ,Idea's i need an Outlet for
    • ... ideas for programs
    • ... stuff that needs to be made
    • ... things that boggle my mind

...

Entries in this blog

bootable windows setup usb on linux , that is capable of  booting in EFI mode and with secureboot enabled

making a bootable windows setup usb on linux , that is capable of  booting in EFI mode and with secureboot enabled :   01. Connect your USB Flash drive. Please note that you will be erasing all the data on it. 02. Open a disk manament app capable of setting efi guids (cgdisk gdisk parted ,...). 03. Delete all partitions on the USB drive 04. Create a new, 1GB partition and give it a GUID for ESP (EF00 in gdisk). and NAME it "ESP" (this will be  its partlabel) 05. Create a second

Herr.Hoefkens

Herr.Hoefkens

first entry linux programs and tools i wish i had known about 10 years ago

Commandline: ccat : a colorized version of cat  use : $cat /etc/fstab # flags = --bg="dark" # has nice feature to output html with --html=true $sensors | ccat --bg="dark" # reading from stdin # notes : to be usefull you should put it as an alias in your ~/.bashrc (or your aliases.bashrc): alias ccat="ccat --bg='dark' -G Decimal='*green*' -G Keyword='blue' -G Punctuation='*yellow*' -G Plaintext='reset' -G String='brown' -G Type='*white*' -G Literal='fuchsia'" $mic

Herr.Hoefkens

Herr.Hoefkens in bash tricks

VI Improved(vim) and everything wrong with it!

so after postponing for 15years i finally decided to give vim a go.... these are my issues with it most of them are applicable to the out of the box fesh installation of it.   lets start with the first couple: for a keyboard oriented editor (everything availeble from commands and functions without your hands needing to change positions ~ everything availeble from homerow) , to the point wer navigating a document (usually arrows) is duplicated to the keys hjkl , you do have

Herr.Hoefkens

Herr.Hoefkens

Linux Archives for beginners/ tar basics

with the comming of new linux users , and the existance of many chatrooms and more importantly many use `tldr` wich is much faster and easier to get what you need from then using the man pages. even moreso when many distros dont even set up the defaults so the manpagers are colored and are just a big sea of white text . i see many who dont actually know how to use the tar command and stuff like: help me im doing : tar fxcz somefile.tar.bz2 and it gives an error help me im doing

Herr.Hoefkens

Herr.Hoefkens in bash tricks

Some nice BAT (b-cat) functionallity:colorize [pattern] to STDOUT on the fly [oneliner|script]

#!/usr/bin/env sh READFROM=$1 MATCH=$2 COLOR=$[ 29 + 0$3 ] printf "\nPress \033[1;32m[ctrl]+[c]\033[0m to quit.\n\n" function help() { echo 'USE: $ bwatch [PATH] [STR] [INT]' echo 'PATH : file to watch' echo 'STR : string to watch for' echo 'INT : {0..16} Color (ANSI 29+)' echo ' : eg: 2 = RED 3 = GREEN ,... ' echo 'TIP: use in Terminal with miniview/minimap to quickly spot highlighted content;eg http://terminolo.gy' exit } [[ $1 == -h ]] && help tail -n 5 -f $READFROM | bat

Herr.Hoefkens

Herr.Hoefkens in bash tricks

Bash history script , that collects all , and sync all with current on top:

#!/usr/bin/env bash # ############################################################################ # # PATH: /opt/local/config/rc/bash AUTHOR: Hoefkens.j@gmail.com # # FILE: 311_history.conf 2023-04-04 09:33:40 # ############################################################################ # HISTFOLDER="/var/cache/bash/history" HISTGLOBAL="${HISTFOLDER}/history.glob" HISTSESSION="${HISTFOLDER}/history.session.$$" HISTFILE="${HISTFOLDER}/history.$$" HI

Herr.Hoefkens

Herr.Hoefkens in bash tricks

Bash Aliasses (update:changed gio trash to trash-cli)

Some of you might have notice that when you run gio trash inside a bind-mounted folder, it fails with:   theirs seems no fix for this in term s of gio trash, however , trash-cli has no problem doing this, its not as versatile as gio, (only does trashing|restoring|cleaning) but it does trashing really well,     so i changed the aliasses in my bashrc alias file to this command. Here is the updated version of the file: #!/usr/bin/env bash # ##################

Herr.Hoefkens

Herr.Hoefkens in bash tricks

Bash Aliases

#!/usr/bin/env bash # ############################################################################ # # PATH: /opt/local/config/rc/bash AUTHOR: Hoefkens.j@gmail.com # # FILE: 511_aliases.conf # ############################################################################ # # ReSource Bash Running Config (use after config changes) alias rebash='source ~/.bash_profile' # ls & exa Shorhands alias ll='ls -bghAls' alias llr='ls -bRghAls' alias tree='exa -T' alias llt='exa -laT' alia

Herr.Hoefkens

Herr.Hoefkens in bash tricks

pacman is dumb really dumb from time to time

here is another thing that really sucks hairy monkeyballs in any arch based distro: so apparently pacman knows these two packages are actually the same as they occupy the same slot (conflict): :: ki18n and ki18n-git are in conflict. Remove ki18n-git? [y/N] (=>both answers haave the same effect the process exits)  but even if sees the conflict it doent actually know these are the same packages, since the -git version is installed lets check what version of the package is curren

Herr.Hoefkens

Herr.Hoefkens

Everything is a file is maby not always the best

sometimes the "everything is a file"  approach on *nix systems is great sometimes its not really especially when programming its not. the filesystem structure of certain  " special/magic" directories and there files is maybe unlikely to change in the near future. but filepaths tend to be just strings most of the time. even when they arent at first glance if you follow the trail down to where they are actually constructed they usually end up being just a collection of hardcoded str

Herr.Hoefkens

Herr.Hoefkens

Only in Python ...

Not to take a piss on python , i actually like the languagee , especially the development speed you get with it. but... only in python are things that are an order of magnitude faster in other languages actually much much slower:   Branching logic vs Branchless Logic: import random from time import perf_counter_ns,sleep testnrs = [random.randrange(0,5,1) for _ in range(2**20)] def branch(nr,idx,result): if nr < 1 : result|=int((str(abs(result))*9)[1:3]) elif nr ==

Herr.Hoefkens

Herr.Hoefkens

This is one of the Reasons Why Snaps / Flatpacks / Appimgz Suck!

Installing a simple MAIL client...  ~1.2GB Download size, not talking actual size here... for a 1GB+ download,  I want my mail client to fondle my balls gently while I read my mail ....  I'll clarify my main problem with it:  Nvidia divers were already on my system... my locale was aswel, so was the adwaita-dark theme, and any other thing listed , but for the mail client.   "Yeah but those are one time installs"  I hear you say "next flatsnap image you install they dont

Herr.Hoefkens

Herr.Hoefkens in irritations

Bash Sourcedir script :final?

more or less final version : lists faulty source files now . and doesnt count them in the final sourced file count. needs some testing now 🙂 #!/usr/bin/env bash # ############################################################################ # # PATH: /etc/profile.d AUTHOR: Hoefkens.J@gmail.com # # # FILE: bash_sourcedir.sh 0v99 - 2023.05.22 # # ############################################################################ # function

Herr.Hoefkens

Herr.Hoefkens in bash tricks

Script that can source all files in a directory , with filter

#!/usr/bin/env bash # ############################################################################ # # PATH: /etc/profile.d AUTHOR: Hoefkens.J@gmail.com # # FILE: sourcedir.sh # ############################################################################ # ############################################################################ function sourcedir { local SRC local SELECTED local MATCH local I local N local W local GP local GC local GS local CONF l

Herr.Hoefkens

Herr.Hoefkens in bash tricks

×