Welcome

Apologia, decisions, & consequences

Blogroll

Tags

Create a systemd service for YaCy

September 22nd, 2024 by Lynx Economicus   URI: https://memorymatrix.cloud/archives/744.html

Create file /usr/lib/systemd/system/yacy.service and add this content:

[Unit]
Description=YaCy search server
After=network.target
Restart=always

[Service]
Type=forking
User=yacy
ExecStart=/opt/yacy/startYACY.sh
ExecStop=/opt/yacy/stopYACY.sh
Restart=on-failure
RestartSec=1s

[Install]
WantedBy=multi-user.target

Then use systemctl enable yacy.service.

Posted in Computing Notes | Tagged: , ,

Hydrogen Infrastructure

August 1st, 2024 by Lynx Economicus   URI: https://memorymatrix.cloud/archives/695.html

Zero Hedge reported on California launching a hydrogen hub infrastructure for hydrogen refueling infrastructure. https://www.zerohedge.com/political/california-launch-hydrogen-hub-expand-zero-emission-technology.  The California government’s official press release on the Hydrogen Hub was released 17 July 2024 at https://www.gov.ca.gov/2024/07/17/california-launches-world-leading-hydrogen-hub/. Clean Technica produced an article about the Hydrogen Hub grant program that covers multiple states.

This blog will follow Nikola and Hyla, which are available online at https://www.nikolamotor.com/ and https://www.hyla.co/. Nikola produces the TRE FCEV.

General Motors has a partnership with the U.S. Department of Energy and Honda for Hydrogen development. Hyundai has the XCIENT fuel cell truck. Kenworth has the T680. Like the Hyundai the T680 places the fuel tanks behind the driver from floor to ceiling.  The Kenworth is a partnership with Toyota with Toyota producing the fuel cell power plant and Kenworth producing the trucks.  All of these are limited to around 400-450 miles of range, with the exception of one of the XCIENTS which listed 400km, which is 248 miles. Hyundai has a class 8 truck in partnership with a company called Plus, and they claim to be fully autonomous.

Volvo has fuel cell trucks with a range of up to 1000 km.  International Trucks has a hydrogen fuel cell technology designed for routes 300+ miles in testing.  They use the General Motors fuel cell platform, and OneH2 mobile hydrogen production and fueling technology to bring the fuel station to the customer in a manner similar to Hyla.

Mistral Instruct using the above as Local Documents input:

The Hydrogen Hub infrastructure launched by California is an important step towards expanding zero-emission transportation options. With more refueling stations available, it will be easier for consumers to switch to hydrogen-powered vehicles and reduce their carbon footprint. It’s great to see multiple companies working together on developing hydrogen technology, including Nikola, Hyla, General Motors, Honda, Kenworth, Toyota, Volvo, International Trucks, and more. The range of these vehicles varies, but it’s clear that there is a growing interest in producing longer-range hydrogen fuel cell trucks.

Addendum 9/21/24:  Ford has a hydrogen vehicle in the works with an outsourced power train, but it was not included at the time of original writing.

Posted in Social Science notes | Tagged: , , , , , , , ,

Simon Says and use Mojeek

June 26th, 2024 by Lynx Economicus   URI: https://memorymatrix.cloud/archives/669.html

The Simon Says blog has been online for a long time. Here is an entry from 2008 about ripping CDs on a Mac.  In a way this site shows what is wrong with the web.  Twenty years ago blogs and websites had favorites and blog rolls.  Through this people discovered many great sites.  Around 2012 WordPress removed the Link Manager from the default WordPress and the blog-sphere began to fade away because the links began to fray.  From there, Google began to limit search results to the chosen few.  Recently Bing search has begun allowing scrolling to many different search results again. I went to page 16 the other day just to see.  To use a Search Engine like it’s 2009, which was way better than now, use Mojeek.  I hope they don’t break it.  That’s how I found that 2008 entry about ripping CDs on a Mac.  That is a discovery that one would never find on Google.  It was like stepping into a time machine.

Posted in History notes | Tagged: , ,

Shrink Firefox Interface

June 24th, 2024 by Lynx Economicus   URI: https://memorymatrix.cloud/archives/663.html

Use about:config –> browser.uidensity .

browser.uidensity is set to 0 by default.  Changer the  value to 1 and it takes immediate effect.

Posted in Computing Notes | Tagged: ,

VirtualBox Disk Conversion

June 10th, 2024 by Lynx Economicus   URI: https://memorymatrix.cloud/archives/653.html

To convert a dynamic VirtualBox disk to a Fixed disk, run the following command:

vboxmanage clonemedium disk /path/disk.vdi /path/newdisk.vdi -variant Fixed

using –variant Standard would create a dynamic disk.  Then open the virtual machine and remove the existing disk and attach the new disk.  Then use the media manager to delete the unused media.

Use the following command to list registered virtual disks:

vboxmanage list hdds

Posted in Computing Notes | Tagged: , ,

Browser Extensions

June 10th, 2024 by Lynx Economicus   URI: https://memorymatrix.cloud/archives/651.html

Chromium:

Joplin Web Clipper, Zotero Connector, floccus bookmarks sync, uBlock Origin, Quick Javascript Switcher, SingleFile, uMatrix

Firefox:

SingleFile, Copy PlainText, floccus bookmarks sync, Joplin Web Clipper, Passman, Search by Image, Tree Style Tab, uMatrix, Undo Close Tab, Web Archives

Posted in Computing Notes | Tagged: , , ,

Debian 12 PATH and X11

May 18th, 2024 by Lynx Economicus   URI: https://memorymatrix.cloud/archives/592.html

A few quirks with Debain 12 include that path not being set in similar fashion to Fedora, Ubuntu, and other distributions.  One must regularly set

export PATH=$PATH:/usr/sbin

In Gnome, applications will open on the server instead of the client when using X11 forwarding.  This will occur even though xcalc opens on the client normally.  The way to avoid this is to add the following to .bashrc

unset XDG_RUNTIME_DIR 
unset GDK_BACKEND

The general rule is compress, then encrypt.1, 2

1. https://stackoverflow.com/questions/4676095/when-compressing-and-encrypting-should-i-compress-first-or-encrypt-first

2. https://crypto.stackexchange.com/questions/33737/is-it-better-to-encrypt-before-compression-or-vice-versa

Posted in Computing Notes | Tagged: , , , ,

Move /var to new disk

May 18th, 2024 by Lynx Economicus   URI: https://memorymatrix.cloud/archives/588.html

To add a new virtual disk and move the existing Linux partition to the new disk use the following process. The process assumes standard partitions without the use of Logical Volume Manager (LVM).

1. Backup the existing VM. One good way to do that is to clone the Virtual Machine and use the procedure on the new Virtual Machine.

2. Create the partition and format it.

$ mount /dev/sbd /mnt
$ shopt -s dotglob
$ rsync -aulvXpogtr /var/* /mnt
$ nano /etc/fstab

Add this line, replacing sdb and ext4 as necessary:

/dev/sdb /var ext4 defaults,noatime,nofail 0 2

Then

$ mv /var/ /var.old

Reboot and enjoy the new drive.

Posted in Computing Notes | Tagged: ,

Install Java 21 in Debian 12

May 4th, 2024 by Lynx Economicus   URI: https://memorymatrix.cloud/archives/361.html

Minecraft Java edition lost compatibility with Java 17 between 1.20.4 and 1.20.6. Version 1.20.4 works with Java 17, and 1.20.6 no longer works with Java 17.  Several guides appear online for installing downloaded packages of the 64-bit runtime from Oracle or other sources.  Since Debian offers 32-bit server operating systems in the present day, the package manager versions are the easiest option if one uses the 32-bit version of Debian.  One of the reasons to use the 32-bit version of Debian is for use with older versions of Minecraft such as 1.10 and 1.12.  The older versions’ ecosystem contain an incredible number of mods.  The older versions require 32-bit java runtimes and the easiest way to handle that is to use a 32-bit operating system and then one can have newer versions of Java alongside older versions of Java and then one can run any version of Minecraft and Minecraft Forge that they desire.

Edit /etc/apt/sources.list to contain the following lines:

deb http://deb.debian.org/debian testing main
deb-src http://deb.debian.org/debian testing main

Then, run the following commands.

apt-get update
apt-get install openjdk-21-jre
java –version

https://wiki.debian.org/DebianTesting contains a good reference guide for using Debian Testing, including details on upgrading to the next distribution.  The approximate Java lifecycle can be found at https://www.oracle.com/java/technologies/java-se-support-roadmap.html.

Posted in Computing Notes | Tagged: , , ,

Hypothesis test memo no. 1

May 4th, 2024 by Lynx Economicus   URI: https://memorymatrix.cloud/archives/350.html

1. R2 is the coefficient of determination, which is the square of the Pearson correlation coefficient, r, the formula for which is ρ=β1(σx/σy), where β1 is the parameter estimate. ASCI and Unicode text does not have a circumflex, ^, on top of the β. For this documentation the objective is multiplatform long-term readability so an equation editor with specialized support for circumflexes is out of the question.

2. There is also the existence of the rejection region method. We reject the null hypothesis if the test statistic’s absolute value is greater than the critical value, which we can express with the formula Reject if |t| > tα/2,n-1

Posted in Social Science notes | Tagged: ,

Disable updates in Thunderbird

April 2nd, 2024 by Lynx Economicus   URI: https://memorymatrix.cloud/archives/1058.html

Open the Thunderbird program folder (e.g. C:\Program Files (x86)\Thunderbird)
create a new folder named distribution
Create a file named policies.json with the following content:

 

{
    "policies": {
    "DisableAppUpdate": true
    }
}

Thanks to sifferedd.

Posted in Computing Notes | Tagged: ,

Print environmental variables in Bash

April 2nd, 2024 by Lynx Economicus   URI: https://memorymatrix.cloud/archives/1052.html

Use printenv to see what environment variables are set.

#!/usr/bin/env bash
printenv
    set -x

Posted in Computing Notes | Tagged: ,

.nanorc in CentOS

April 2nd, 2024 by Lynx Economicus   URI: https://memorymatrix.cloud/archives/1050.html

Edit $HOME/.nanorc to contain the following:

include /usr/share/nano/java.nanorc
include /usr/share/nano/man.nanorc
include /usr/share/nano/nanorc.nanorc
include /usr/share/nano/python.nanorc
include /usr/share/nano/sh.nanorc
include /usr/share/nano/html.nanorc
include /usr/share/nano/perl.nanorc
include /usr/share/nano/php.nanorc

CentOS 7 uses a much older version of nano than the one that presently ships on most distributions. The php.nanorc on newer The following should appear in /usr/share/nano/php.nanorc on CentOS7 to allow syntax highlighting for php:

 

## Syntax highlighting for PHP

syntax "php" "\.(php[23457s~]?|phtml|ctp)$"

# PHP markings.
color brightgreen "()"

# Function names.
color white "\

Posted in Computing Notes | Tagged: , ,

The .bashrc file I use on CentOS6

April 2nd, 2024 by Lynx Economicus   URI: https://memorymatrix.cloud/archives/1047.html

The .bashrc file I use on CentOS6

 

# .bashrc

# User specific aliases and functions

alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# Source global definitions
if [ -f /etc/bashrc ]; then
        . /etc/bashrc
fi

# system variables
export VISUAL=nano  # sets nano as the crontab editor
export GZIP=-9      # maximum compression
export XZ_OPT=-9    # maximum compressions

# ls modifications
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'

# calculator
calc() { echo "$*" | bc -l; }

# Generate a UUID
uuid() { UUID=$(cat /proc/sys/kernel/random/uuid) && echo $UUID; }

# CHANGE SHELL/WINDOW TITLE
# Works on Opensuse 15.3
# PS1=$PS1"\[\e]0;test1\a\]"
shellrename() { read -p "Enter new shell name: " name && PS1=$PS1"\[\e]0;${name}\a\]"; }

# For older versions of gnome-terminal
# shellrename() { read -p "Enter new shell name: " name && PROMPT_COMMAND='echo -ne "\033]0;${name}\007"'; }

# Zen Burn
# Another old way that works great in gnome-terminal while causing problems
# in some configurations involving SSH:
echo -ne '\e]12;#BFBFBF\a'
echo -ne '\e]10;#DCDCCC\a'
echo -ne '\e]11;#3F3F3F\a'
echo -ne '\e]4;0;#3F3F3F\a'
echo -ne '\e]4;1;#705050\a'
echo -ne '\e]4;2;#60B48A\a'
echo -ne '\e]4;3;#DFAF8F\a'
echo -ne '\e]4;4;#506070\a'
echo -ne '\e]4;5;#DC8CC3\a'
echo -ne '\e]4;6;#8CD0D3\a'
echo -ne '\e]4;7;#DCDCCC\a'
echo -ne '\e]4;8;#709080\a'
echo -ne '\e]4;9;#DCA3A3\a'
echo -ne '\e]4;10;#C3BF9F\a'
echo -ne '\e]4;11;#F0DFAF\a'
echo -ne '\e]4;12;#94BFF3\a'
echo -ne '\e]4;13;#EC93D3\a'

Posted in Computing Notes | Tagged: , ,

The best Alias for ls

March 2nd, 2024 by Lynx Economicus   URI: https://memorymatrix.cloud/archives/165.html

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..

Posted in Computing Notes | Tagged: ,

Install iftop on Oracle Linux 9

February 23rd, 2024 by Lynx Economicus   URI: https://memorymatrix.cloud/archives/1702.html

dnf install oracle-epel-release-el9
dnf install iftop

iptraf is already in the default repositories.

Posted in Computing Notes | Tagged: , , , ,

A good version of ll

February 20th, 2024 by Lynx Economicus   URI: https://memorymatrix.cloud/archives/162.html

A really good version of the ll alias is:

ls –lahF, although on some versions ls –lahp looks better than F.

Posted in Computing Notes | Tagged: ,

LS alias and Mozilla DRM bar

February 11th, 2024 by Lynx Economicus   URI: https://memorymatrix.cloud/archives/159.html

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.

Posted in Computing Notes | Tagged: , ,

Double Sided Scan and PDF

February 1st, 2024 by Lynx Economicus   URI: https://memorymatrix.cloud/archives/124.html

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 +"%Y-%m-%d")
Y=$(date +"%Y")
WORKDIR=/home/username/Temp/
OUTPATH=/home/username/Scans/${Y}/
#  Create a folder, ~/Temp and create a folder, ~/Scans
mkdir -p "/home/username/Scans/${Y}"

hp-scan --adf --mode=color &&
PART=hpscan
LATESTSCAN=`ls -t ${PART}*pdf | sed "1q"`
echo "${LATESTSCAN} ready for ${FILEOUTPUT}"

#  Why you shouldn't parse the output of ls
#  http://mywiki.wooledge.org/ParsingLs 
#  This does not use the FILEOUTPUT variable itself because the cp command
#  seems to have trouble copying the file correctly, even with switches. 

# Thanks Elektropepi at https://github.com/qpdf/qpdf/issues/259
function pdfscanmerge() {
	if [ $# -ne 3 ]; then 
		echo "Usage: pdfscanmerge"; return; fi let odd_pages=$(qpdf --show-npages $1) let even_page=$(qpdf --show-npages $2) argument= for (( odd_page=1; odd_page0 ]; then argument+="$2 $even_page " fi let even_page-- done qpdf --empty --pages $argument -- $3 } cp ${LATESTSCAN} "$WORKDIR$1-uncompressed-scanned-${YMD}.pdf" gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress -sOutputFile="$OUTPATH${YMD}-$1.pdf" ${LATESTSCAN} sleep 1 rm -f ${LATESTSCAN} rm -f "$WORKDIR$1-uncompressed-scanned-${YMD}.pdf" killall evince read -p "Load the reverse sides and press any key:" n hp-scan --adf --mode=color && PART=hpscan LATESTSCAN=`ls -t ${PART}*pdf | sed "1q"` echo "${LATESTSCAN} ready for ${FILEOUTPUT}" cp ${LATESTSCAN} "$WORKDIR$1-uncompressed-scanned-reverse-${YMD}.pdf" gs -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -dCompatibilityLevel=1.4 -dPDFSETTINGS=/prepress -sOutputFile="$OUTPATH${YMD}-$1-reverse.pdf" ${LATESTSCAN} sleep 1 rm -f ${LATESTSCAN} rm -f "$WORKDIR$1-uncompressed-scanned-reverse-${YMD}.pdf" killall evince pdfscanmerge "$OUTPATH${YMD}-$1.pdf" "$OUTPATH${YMD}-$1-reverse.pdf" "$OUTPATH${YMD}-$1-collated.pdf" rm -f "$OUTPATH${YMD}-$1.pdf" rm -f "$OUTPATH${YMD}-$1-reverse.pdf"

Posted in Computing Notes | Tagged: , , , ,

Automated Database Restart

January 21st, 2024 by Lynx Economicus   URI: https://memorymatrix.cloud/archives/113.html

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 Apache... >> /home/centos/administration/apache.log
systemctl is-active mariadb && echo "${timestamp}" MariaDB is active so not starting >> /home/centos/administration/mariadb_active.log || echo "${timestamp}" MariaDB is not Active >> /home/centos/administration/mariadb_inactive.log
systemctl is-active mariadb && echo "${timestamp}" No need to restart MariaDB || systemctl start mariadb
systemctl start httpd && echo "${timestamp}" restarting apache...>> /home/centos/administration/apache.log

Posted in Computing Notes | Tagged: , , , ,

« Previous Entries Next Entries »