The best Alias for ls

March 2nd, 2024 – 11:14 pm
Tagged as: Computing Notes

The best alias for ls is ls –halF It is easy to remember, and produces easy to read output with human readable file sizes and / marks present by the directory names..

Install iftop on Oracle Linux 9

February 23rd, 2024 – 4:18 pm
Tagged as: Computing Notes

dnf install oracle-epel-release-el9 dnf install iftop iptraf is already in the default repositories.

A good version of ll

February 20th, 2024 – 3:37 am
Tagged as: Computing Notes

A really good version of the ll alias is: ls –lahF, although on some versions ls –lahp looks better than F.

LS alias and Mozilla DRM bar

February 11th, 2024 – 3:11 am
Tagged as: Computing Notes

Some useful aliases that are not always preconfigured on every Linux version: alias ll=’ls -alF’ alias la=’ls -A’ alias l=’ls –CF’ To eliminate the DRM warning in Firefox and Librewolf without enable DRM, add this to “userChrome.css”: notification[value="drmContentDisabled"]{ display:none !important; } toolkit.legacyUserProfileCustomizations.stylesheets must be set to true in about config.

Double Sided Scan and PDF

February 1st, 2024 – 1:15 pm
Tagged as: Computing Notes

The following script scans PDFs via an auto-document feeder in Hp-Lip and then collates the pages to the correct order when there are reverse sides. No scans will be saved if no data is transmitted for the second set of scans. The second set of scans is the reverse of the pages. #!/usr/bin/env bash YMD=$(date [...]

Automated Database Restart

January 21st, 2024 – 7:41 pm
Tagged as: Computing Notes

Here is a script that checks to ensure the database is running and restarts the service if it is not running.  This was used on a very low memory server to ensure a database remained operational, despite it sometimes crashing due to out of memory errors. #!/bin/bash timestamp=”$(date)” systemctl stop httpd && echo “${timestamp}” Stopping [...]

AppImage Integration

January 21st, 2024 – 7:12 pm
Tagged as: Computing Notes

To install AppImages and integrate them with the desktop environment like a conventional package,  use the AppImage Launcher. LibreWolf’s documentation contains a how-to document on using AppImage Launcher.

Functions in Bash

January 21st, 2024 – 2:57 pm
Tagged as: Computing Notes

This is the code for a function in Bash script. #!/bin/bash # Define a function greet() { echo “Hello, $1″ } # Call the function with “World” as the argument greet “World”

Looping through filenames in Bash

January 21st, 2024 – 1:59 am
Tagged as: Computing Notes

To loop through the subdirectories in a folder, when those subdirectories may contain spaces in the file names, use the following procedure. OLD_IFS=$IFS && IFS=$’\n’ for directory in $HOME/somefolder/*/; do echo “some code here” done IFS=$OLD_IFS  

Bash and *nix Note no. 2

January 10th, 2024 – 6:18 am
Tagged as: Computing Notes

  This document contains some notes on .bashrc for use with Linux systems. alias ll=’ls -alF’ alias la=’ls -A’ alias l=’ls –CF’ if [ -f ~/.bash_aliases ]; then . ~/.bash_aliases fi The preceding two blocks come standard on Ubuntu as of version 2022.04. One tweak for WSL2 on Windows might be the addition of this [...]

Bash and *nix Note no. 1

July 7th, 2023 – 11:41 pm
Tagged as: Computing Notes

7 July 2023: Ubuntu 22.04′s update notifier seems to not include the option to configure any settings, at least after certain conditions exist on a particular system.  To stop the notifier from appearing.  To stop the notifier from appearing use sudo apt-get remove update-notifier 7 July 2023: There are non-snap builds of ungoogled-chromium for Ubuntu [...]

Minecraft Tweaks

March 16th, 2023 – 2:34 am
Tagged as: Computing Notes

To launch java -Xms2048M -Xmx2048M –add-modules=jdk.incubator.vector -XX:+UseG1GC -XX:+ParallelRefProcEnabled -XX:MaxGCPauseMillis=200 -XX:+UnlockExperimentalVMOptions -XX:+DisableExplicitGC -XX:+AlwaysPreTouch -XX:G1HeapWastePercent=5 -XX:G1MixedGCCountTarget=4 -XX:InitiatingHeapOccupancyPercent=15 -XX:G1MixedGCLiveThresholdPercent=90 -XX:G1RSetUpdatingPauseTimePercent=5 -XX:SurvivorRatio=32 -XX:+PerfDisableSharedMem -XX:MaxTenuringThreshold=1 -Dusing.aikars.flags=https://mcflags.emc.gs -Daikars.new.flags=true -XX:G1NewSizePercent=30 -XX:G1MaxNewSizePercent=40 -XX:G1HeapRegionSize=8M -XX:G1ReservePercent=20 -jar server-1.21.1.jar nogui

Rudimentary versioning system

October 19th, 2020 – 11:14 am
Tagged as: Computing Notes

Some time ago, Python 2 was the default language for use with Linux and Gnome 3. A set of extensions for Gnome, called Nautilus Python existed which allowed one to create customized right click menus. One of these was called “Historical Copy” and it created a lovely copy of the file with a timestamp inserted [...]

Persistent Notification in Gnome 3

August 15th, 2020 – 11:18 am
Tagged as: Computing Notes

This is a GTK notification in Linux that remains on screen until it is clicked. #!/usr/bin/python3 import gi gi.require_version(‘Notify’, ’0.7′) from gi.repository import Notify gi.require_version(‘Gtk’, ’3.0′) Notify.init("Hello world") Hello = Notify.Notification.new("Hello world – the heading", "This is an example notification.", "dialog-information") # https://www.devdungeon.com/content/desktop-notifications-linux-python Hello.set_urgency(2) # Highest priority Hello.show() Last updated and tested 12 December 2020 [...]

Synchronize time on CentOS 6

December 27th, 2011 – 8:45 pm
Tagged as: Computing Notes

This will start the time service and synchronize the clocks on CentOS 6. yum install ntp chkconfig ntpd on ntpdate pool.ntp.org /etc/init.d/ntpd start