Trans Scend Survival

Trans: Latin prefix implying "across" or "Beyond", often used in gender nonconforming situations – Scend: Archaic word describing a strong "surge" or "wave", originating with 15th century english sailors – Survival: 15th century english compound word describing an existence only worth transcending.

Category: DIY (page 1 of 5)

JDK Management in R

Quickly & forcefully manage extra JDKs in base R
Simplify rJava woes

# get this script:

rJava is depended upon by lots of libraries- XLConnect, OpenStreetMap, many db connectors and is often needed while scripting with GDAL.

library(XLConnect)   # YMMV

Errors while importing a library with depending on a JDK are many, but can (usually) be resolved by reconfiguring the version listed somewhere in the error.

On mac OSX (on Mojave at least), check what you have installed here- (as admin, this is a system path) :

sudo ls  "/Library/Java/JavaVirtualMachines/ 

I seem to usually have at least half a dozen or more versions in there, between Oracle and openJDK. Being Java, these are basically sandboxed as JVMs and are will not get in each others way.


Unlike JDK configuration for just about everything else, aliasing or exporting a specific release to $PATH will not cut it in R. The shell command to reconfigure for R-

sudo R CMD javareconf

...seems to always choose the wrong JDK. Renaming, hiding, otherwise trying to explain to R the one I want (lib XLConnect currently wants none other than Oracle 11.0.1) is futile.
The end-all solution for me is usually to temporarily move other JDKs elsewhere.
This is not difficult to do now and again, but keeping a CLI totally in R for moving / replacing JDKs makes for organized scripting.

 JDKmanager help: 
 (args are not case sensitive) 
 (usage: `sudo rscript JDKmanager.R help`) 

 list    :: prints contents of default JDK path and removed JDK path 
 reset   :: move all JDKs in removed JDK path back to default JDK path 
 config ::  configure rJava.  equivalent to `R CMD javareconf` in shell 

 specific JDK, such as 11.0.1, 1.8,openjdk-12.0.2, etc: 
    searches through both default and removed pathes for the specific JDK.  
    if found in the default path, any other JDKs will be moved to the `removed JDKs` directory. 
    the specified JDK will be configured for rJava.

QEMU for Raspian ARM!

Updated 11/6/19

Visit the repo on Github here-

tested on Mac OSX 10.14.6

Emulates a variety of Raspian releases on proper ARM hardware with QEMU.


QEMU and wget (OSX homebrew)

brew install qemu wget

Get the Python3 CLI in this repo:



After the first launch, it will launch from the persistent .qcow2 image.

With no arguments & in a new folder, Raspian "stretch-lite" (no desktop environment) will be:

  • downloaded as a zip archive with a release kernel
  • unarchived --> to img
  • converted to a Qcow2 with 8gb allocated as disk
  • launched from Qcow2 as administrator
sudo python3 

Optional Arguments:

  • -h prints CLI usage help
  • -rm removes ALL files added in dir with
  • stretch uses standard graphical stretch release with GUI
  • stretchlite for stretchlite release [default!]
  • buster for standard graphical buster release [YMMV]
  • busterlite for busterlite release [YMMV]
# examples:
sudo python3 busterlite
python3 QEMU_Raspian -h  # print help

Burn as .img:

qemu-img convert -f qcow2 -O raw file.qcow2 file.img

Four Pi Emulations ala QEMU

…To Lasercut / 3DP a Really Accurate Coil Winder

See the repo here:
Parent here:
Added Sketchup Viewer 10/17/19- see below

Parent machine:

...Adding a parametric (wire gauge, coil bobbin width, stepper resolution) guide:

...More to come soon xD

Decentralized Pi Video Monitoring w/ motioneye & BATMAN

Visit the me here on Github
Added parabolic musings 10/16/19, see below

...On using motioneye video clients on Pi Zeros & Raspbian over a BATMAN-adv Ad-Hoc network

link: motioneyeos
link: motioneye Daemon
link: Pi Zero W Tx/Rx data sheet:
link: BATMAN Open Mesh

This implementation of motioneye is running on Raspbian Buster (opposed to motioneyeos).

Calculating Mesh Effectiveness w/ Python:
Please take a look at the idea here is one should be able to estimate the maximum plausible distance between mesh nodes before setting anything up. It can be run with no arguments-


...with no arguments, it should use default values (Tx = 20 dBm, Rx = |-40| dBm) to print this:

you can add (default) Rx Tx arguments using the following syntax:
                 python3 20 40
                 python3 <Rx> <Tx>                 

 57.74559999999994 ft = max. mesh node spacing, @
 Rx = 40
 Tx = 20

Regarding the Pi:
The Pi Zero uses an onboard BCM43143 wifi module. See above for the data sheet. We can expect around a ~19 dBm Tx signal from a BCM43143 if we are optimistic. Unfortunately, "usable" Rx gain is unclear in the context of the Pi.

Added 10/16/19:
Notes on generating an accurate parabolic antenna shape with FreeCAD’s Python CLI:

For whatever reason, (likely my own ignorance) I have been having trouble generating an accurate parabolic dish shape in Fusion 360 (AFAICT, Autodesk is literally drenching Fusion 360 in funds right now, I feel obligated to at least try). Bezier, spline, etc curves are not suitable!
If you are not familiar with FreeCAD, the general approach- geometry is formed through fully constraining sketches and objects- is quite different from Sketchup / Tinkercad / Inventor / etc, as most proprietary 3d software does the “constraining” of your drawings behind the scenes. From this perspective, you can see how the following script never actually defines or changes the curve / depth of the parabola; all we need to do is change how much curve to include. A wide, shallow dish can be made by only using the very bottom of the curve, or a deep / narrow dish by including more of the ever steepening parabolic shape.

import Part, math

# musings derived from:

# thinking about units here:
tu = FreeCAD.Units.parseQuantity

def mm(value):
    return tu('{} mm'.format(value))

rs = mm(1.9)
thicken = -(rs / mm(15)) 

# defer to scale during fitting / fillet elsewhere 
# create a parabola with the symmetry axis (0,0,1)

# get only the right part of the curve

# make a solid

# apply a thickness


# Fill screen:
# Remove Part in default env:

FWIW, here is my Python implimentation of a Tx/Rx "Free Space" distance calulator-

from math import log10
from sys import argv
# estimate free space dBm attenuation:
# ...using wfi module BCM43143:

Tx = 19~20 dBm
Rx = not clear how low we can go here

d = distance Tx --> Rx
f = frequency
c = attenuation constant: meters / MHz = -27.55; see here for more info:

f = 2400  # MHz
c = 27.55 # RF attenuation constant (in meters / MHz)

def_Tx = 20  # expected dBm transmit
def_Rx = 40  # (absolute value) of negative dBm thesh

def logdBm(num):
    return 20 * log10(num)

def maxDist(Rx, Tx):
    dBm = 0
    d = .1  # meters!
    while dBm < Tx + Rx:
        dBm = logdBm(d) + logdBm(f) - Tx - Rx + c
        d += .1  # meters!
    return d

# Why not use this with arguments Tx + Rx from shell if we want:
def useargs():
    use = bool
        if len(argv) == 3:
            use = True
        elif len(argv) == 1:
            print('\n\nyou can add (default) Rx Tx arguments using the following syntax: \n \
                python3 20 40 \n \
                python3 <Rx> <Tx> \
            use = False
            print('you must use both Rx & Tx arguments or no arguments')
            raise SystemExit
        print('you must use both Rx & Tx arguments or no arguments')
        raise SystemExit
    return use

def main():

    if useargs() == True:
        arg = [int(argv[1]), int(argv[2])]
        arg = [def_Rx, def_Tx]

    print(str('\n ' + str(maxDist(arg[0], arg[1])*3.281) + \
        ' ft = max. mesh node spacing, @ \n' + \
        ' Rx = ' + str(arg[0]) + '\n' + \
        ' Tx = ' + str(arg[1])))


Persistent, Live Ubuntu for College

Below is are live mirrors of my "PSU Hacking Club" Ubuntu repos.

Generate psu-hacking.iso image & bootable media

The 'psu-hacking' disk image extends the Ubuntu LTS (18.04.x) operating system with common dependencies/software for the discerning college student.

  • Live, Persistent file storage
  • Fast: Ubuntu LTS + mkusb (casper-rw) = efficient
  • Use (almost) any hardware- take your desktop OS with you
  • Completely self sufficient: does not interact with your existing OS or other hard disks!

There are a variety of methods to setup a persistent, live OS.

Features & Software:

  • Atom editor with Chapel language support
  • R language + RStudio editor / IDE
  • Google Chrome
  • Libre Office suite
  • Common Runtimes and Compilers

Recommended Method:

For Ubuntu + PSU Hacking additions, use mkusb with the 2x USB drive method (below), and run the /scripts/ post install script:

git clone
cd iso-gen/scripts
chmod u+x && sudo ./
sudo reboot now

Visit /Disk-Speed-Testing for speed testing scripts and other info.

Visit /scripts for all install scripts and files for post install, Cubic utility, etc.

Visit /Alt-info_VBox_DD-Util for information on persistent, live environments from VBox VDI.

Make Your Own:

Thus far, the recommended way to get a persistent/live image installed is with two USB sticks:
One completely live (not persistent) Ubuntu drive, from which you can download and run the mkusb utility on the second USB stick.

Personal OS:

  • Download the official Ubuntu image here
  • Download Etcher from here
  • Use Etcher to burn Ubuntu to USB stick #1

USB stick #1:

  • Boot from the USB stick:
    • Mac hardware- hold the alt/option key when the machine turns on
    • Other hardware- hold the boot loader key (usually F12, or F2 / F10) when the machine turns on
  • Follow the Ubuntu prompts (please avoid the host hardware’s disk, do not install anything anywhere yet)

Open a terminal and copy these commands:

# get mkusb
sudo add-apt-repository universe  
sudo add-apt-repository ppa:mkusb/ppa
sudo apt-get update
sudo apt-get install mkusb mkusb-nox usb-pack-efi
  • insert USB stick #2
  • Open mkusb:
    • Follow prompts, psu-hacking iso should be in directory “home”
    • Select NO for “Quick Option” on host’s disk
    • Finish the prompts, quit, shutdown

USB stick #2: - Remove drive #1 - Boot from USB stick #2: - Mac hardware- hold the alt/option key when the machine turns on - Other hardware- hold the boot loader key (usually F12, or F2 / F10) when the machine turns on - Congratulate yourself, you are done!

Building the image:

On Ubuntu LTS

Note: mkusb utility is only available for Debian/Ubuntu

About persistent live Ubuntu:

When burned into a usb stick, this OS is completely self-sufficient and compatible with most (x86-64) computers- the environment, file system, preferences, etc are saved regardless of hardware.

Note:  Cubic utility is no longer used!


Simple File Hosting

Static site built with Hugo CLI

Note, file "core_psu-hacking.iso" is omitted for size constraints- hosted site contains this file @ directory /static/static/

# on OSX
# get hugo

brew install hugo

# clone site

git clone
cd static-site

# Compile and compress public directory

zip -r public

# upload and host with sftp & ssh

> cd
> put

# new terminal window

# check your remote filesystem- the idea is:
> unzip
> rm -rf

visit us

Also, check out the evolving PSU Hacking Club wiki here!

xD  - Jess

« Older posts