Skip to content

Instantly share code, notes, and snippets.

View dayne's full-sized avatar

Dayne Broderson dayne

View GitHub Profile
@dayne
dayne / 0-README-Barrier_Config.md
Last active November 14, 2022 18:01
barrier configuration

I try to avoid using the GUI to configure/run barrier so I created a simple bash script barrier-client.sh to launch my barrier client. It reads from a .config/barrier.cfg file I created to determine the client name and server to connect to.

cat ~/.config/barrier.cfg

BARRIER_CLIENT_NAME=${HOSTNAME}
BARRIER_SERVER=gilbert.lan:24800

This expects the client to already be configured to trust the server. That trust is managed by the ~/.local/share/barrier/SSL/Fingerprints/TrustedServers.txt which should have the fingerprint of the server.

@dayne
dayne / README.md
Last active December 18, 2018 23:06
rhash checker

rhash checker in python

rhash is a great utiltiy for computing hash sums. Even across full directory structures. Handy for creating checksum file manifests to verify complete transfer of files to another location.

Finds any *.sha256 files and assumes they are a checksum manifest for the directory of the same name. Runs a validation of each manifest found and reports if the file doesn't exist or if the checksum does not match.

The point of this is to use the rhash-check.py in Jupyter notebook environments where you can't use rhash directly. If you have rhash has built into it a better alternative to the rhash-check.py script:

rhash -cr --crc-accept=sha256 directory/
@dayne
dayne / README-chef_omnibus_build.md
Last active July 27, 2020 13:46
chef_omnibus_build
@dayne
dayne / 0-WLS_Removing Win Path.md
Last active April 19, 2025 00:44
Cleaning up WLS path to remove /mnt/c paths (world writable).

The Windows Linux Subsystem (WSL) comes with /win/c mounted world read-write and is setup for compatibility between windows and linux by putting all your windows paths into your linux system path. This is great for some usecases. Some tools get grumpy having these world writable directories a users path. While this doesn't break them but it can cause annoying warning messages.

On the other hand, when you don't care about the windows tools being in your path, it might make you more sane not to see those error messages, and also to limit the number of places tools look for supporting binaries not-relevant to themselves.

: warning: Insecure world writable dir /mnt/c in PATH, mode 040777

You can remove all those /mnt/c paths from your $PATH with the following line:

@dayne
dayne / 0_autossh_on_reboot.md
Last active March 22, 2023 03:13
autossh on reboot

A script (that needs some work) that documents for me how to setup and launch an autossh session to a cloud server. Not really useful for others.

Server Setup

If you want to setup your own server though the steps are: Create the remote cloud server autossh account (Only need to do this once)

useradd -m -s /bin/false autossh
mkdir ~autossh/.ssh && chmod 700 ~autossh/.ssh
touch ~autossh/.ssh/authorized_keys && chmod 600 ~autossh/.ssh/authorized_keys
chown -R autossh.autossh ~autossh/.ssh
@dayne
dayne / 0-ssh-agent_checker_launcher.md
Last active September 28, 2024 05:38
ssh-agent checker/launcher

ssh-agent checker/launcher

About

A bash script for managing ssh-agent that I use for Ubuntu and OSX.

Started as a variation from this classic on Stack Overflow How to check if ssh-agent is already running and then adapted it to align with behaivor I want.

This version does the following:

  • checks for ssh agent forward (remote login) and if so does not setup ssh-agent or any keys
@dayne
dayne / Printing_Steps.md
Last active March 20, 2025 00:34
setting up qidi tech 1 printer on octoprint

My steps for success right now:

  • Find/Create an 3d object (STL file) and load it up in TinkerCad to modify/tweak as needed.
  • Download that file (Downloads/yourfile.stl).
  • Load object file (yourfile.stl) in QidiPrint
  • Click on the object and then verify the correct extruder is selected (I've been using only Right)
  • Check settings:
    • 0.18 mm layer height
    • 0.27 initial layer height
  • 20% infill density
@dayne
dayne / 0-WSL-SSH-README.md
Last active June 30, 2024 05:22
WLS-Helpers

Install linux subsystem Ubuntu 18.04

See Microsoft's WSL install guide for windows 10 for details.

Work-in-progress - command line only install:

  • Open Powershell as Administrator and run:
    Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
  • Open Windows App Store
    • Search for "Ubuntu" and install Ubuntu 18.04

(work in progress - command line install steps):