Source code

Source code of various types

Desktop Shortcuts for Kids 5.2.1

This is the VBscript for shortcuts on Windows 10 that open in Edge browser. ‘ Desktop Shortcuts for Kids, for Windows 10 ‘ Robert Knight ‘ bobby@rdknight.net ‘ version 5 – July 2017 ‘ ———————————————————-‘ Option Explicit Dim wscript_shell_object Dim…
Read more

Data to S3 with command line and encryption

This article details how to archive folders with their contents, encrypt the archives, upload them to S3, and remove the local copies.  A typical usage might be to archive the version of a website that I have with twenty thousand files on a certain date before changing the folder layouts of images for ten thousand images.

Try blocks in R for error handling

R scripts halt execution when an error is encountered.  When batch processing this produces situations where the error can not be merely skipped like it could in a .net application with  user involvement. To use Try() blocks for error handling…
Read more

Android Studio desktop icon

Android Studio for Linux needs a desktop icon.  This is a functioning one to place in ~/.local/share/applications. [Desktop Entry] Version=1.0 Name=Android Studio Comment=Software Development GenericName=AndroidStudio Exec=sh /opt/android-studio/bin/studio.sh Terminal=false X-MultipleArgs=false Type=Application Icon=/opt/android-studio/bin/studio.png Categories=Development; MimeType=text/html;text/xml;application/xhtml+xml Keywords=programming;java;android;ide; Name[en_US]=AndroidStudio

Yum update memory allocation issues

Yum Update Memory Allocation issues on 512M Virtual Machines: Create a Swap file: dd if=/dev/zero of=/swapfile bs=1024 count=655366 chmod 600 /swapfile mkswap /swapfile swapon /swapfile To disable and remove after updates are complete: swapoff -a rm -f /swapfile

High Quality compressed HPLIP scans

HPLIP produces scans far better than what I can accomplish on Windows, even with Adobe Acrobat Standard.  The Auto Document Feeder scans in 8.3 megapixel png files, and then hplip converts them to a multiple-page PDF of extremely high quality. …
Read more

Compressing PDFs in Bash

I have scripts for hplip to scan PDF’s to folders using the ADF. These PDFs are very large. To convert these to smaller file-sizes for emailing, I added the following functions to .bashrc. mediumpdf() { read -p “Enter input PDF…
Read more

Pycharm 2017.3 launcher icon

Pycharm 2017.3 doesn’t create a launcher icon like 2017.2.  This must be created manually.  Here is a functional one. [Desktop Entry] Version=1.0 Name=Pycharm 2017.3.3 Comment=Software Development GenericName=Pycharm Exec=sh /opt/pycharm-community-2017.3.3/bin/pycharm.sh Terminal=false X-MultipleArgs=false Type=Application Icon=/opt/pycharm-community-2017.3.3/bin/pycharm.png Categories=Development; MimeType=text/html;text/xml;application/xhtml+xml Keywords=programming;python;ide; Name[en_US]=Pycharm The list of…
Read more

Zip files and UUID from Bash

Two quick items for .bashrc.  The archive command takes a folder name and zips its contents.  The UUID produces a unique number easily. archive() { read -p “Enter folder name: ” name && zip -rv9 $name-$(\ date +”%Y-%m-%d-%H%M%p”).zip $name; }…
Read more

Grub2 change with latest CentOS update

The previous article regarding configuring Grub 2 for Windows 10 no longer works with the latest CentOS updates.  Here is the newer one. File to edit: /etc/grub.d/40_custom Content to add: menuentry “Windows 10 (system) (on /dev/sda1)” –class windows –class os…
Read more