Skip to content

Instantly share code, notes, and snippets.

free hugs


free hugs
Block or report user

Report or block todgru

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
todgru /
Last active Nov 26, 2019
Remote, Office Not Require - summary of points that stood out for me

Remote, Office not Required

1. If I can't see them, how do I know they're working?

(pg 54) People have amazing ability to live down to low expectations, or live up to high expectations. If there are trust issues with employees, then the employer made poor hiring decision. Employer/Employee trust is fundamental.

2. People’s homes are full of distractions

(pg 58) being easily distracted from work could mean the work is not well defined or the task is menial, pointless. Might be a chance that if someone feels like this, others on the team might feel the same.

todgru /
Last active Nov 15, 2019
vpn route through another vpn pihole pivpn dnsmasq openvpn


Ideally, I like to run one vpn. I have OpenVPN/PiVPN working just fine.

On the PiVPN server, I'd like to run a VPN client to my work office.

It's difficult to get Cisco VPN client and Tunnelblick clients running side-by-side on the same machine, ie my local dev machine, without a seeming hack(see below).

I have it working locally.

  • Cisco AnyConnect Client connect to work VPN. Only specific resources are made available. All other traffic is routed as normal.
todgru / full-object-logging.js
Created Oct 9, 2019
javascript display entire object without truncating object depth
View full-object-logging.js
// to log an entire object without trucated depth:
console.dir(myDeeplyNestedObject, { depth: null });
View sunrise-sunset-algorithm.txt
Sunrise/Sunset Algorithm
Almanac for Computers, 1990
published by Nautical Almanac Office
United States Naval Observatory
Washington, DC 20392
View iterator.js
const arr = [1, 2, 3, 4, 5, 6];
const iter = arr[Symbol.iterator]();
const foo = i => {
const v =;
if (v.done) return "done!";
console.log("next!", v.value);
return foo(i);
todgru / rpi3-bt-keyboard.txt
Created Jun 30, 2019 — forked from tekemperor/rpi3-bt-keyboard.txt
Connect Apple Wireless Keyboard to Raspberry Pi 3 in Raspbian
View rpi3-bt-keyboard.txt
sudo service bluetooth status # Verify bluetooth is active.
sudo bluetoothctl # Lauch bluetooth subshell.
agent on # [No idea what this does.]
default-agent # [No idea what this does.]
scan on # Displays a list of available devices.
pair XX:XX:XX:XX:XX:XX # This prepares a potential connection, the X's represent your device ID
# A "PIN code" will be displayed, type it on the keyboard and press "enter".
trust XX:XX:XX:XX:XX:XX # Adds device to trusted devices, this survives reboot.
connect XX:XX:XX:XX:XX:XX # Connect to the device now.
exit # Return to previous shell.
todgru /
Last active Jun 19, 2019
enable ssh on raspberry pi raspian fresh install etcher OS X Mac network cable direct connect
  • after image is flashed using Etcher, cd /Volumes/boot.
  • Then add ssh file to root. touch ssh.
  • connect network cable between os x computer and raspberry pi. boot the raspberry pi.
  • wait a minute.
  • then ssh pi@raspberrypi.local

That's it. No need for a screen, keyboard or any other device to get into the pi. :)

View gist:4ce29f55ea39be537b8eb69ae1792449
meteor shower intensity
View gist:5d0219bdd81ab3923a82f1b9e96e5254
good link to running ntp time server on rpi with gps
todgru /
Last active May 29, 2019
trim an mp3 from the command line cli using ffmpeg copies to new file, original undedited

trim an mp3

I record mp3s from a few streams. Sometimes the recordings do not stop on schedule. This command allows me to trim or trucate the mp3 file.

ffmpeg -i infile.mp3 -vn -acodec copy -ss 00:00:00 -t 01:00:34 outfile.mp3

installation on ubuntu 14.04

You can’t perform that action at this time.