Skip to content

Instantly share code, notes, and snippets.

Working from Home

Justin Paul recklessop

Working from Home
View GitHub Profile
recklessop /
Created Jan 7, 2020
script to add a user to sudoers
# Script for adding and removing user from /etc/sudoers file used by sudo
# for bootstrapping perl soap framework
# This code assuming that user being added to sudo file has been already created
export PATH
View Get-IgniteContent.ps1
# Author Rajesh Sitaraman
# @rjesh |
Download Ignite 2019 session presentation slides and videos.
PS C:\> .\Get-IgniteContent.ps1 -DownloadPath /Users/rajeshsitaraman/src/public/share/IG-2019 -Keyword "AI"
PS C:\> .\Get-IgniteContent.ps1 -DownloadPath /Users/rajeshsitaraman/src/public/share/IG-2019 -Keyword "Teams" -IncludeVideos

ZVM Inbound Ports

  • 9989
  • 9969
  • 9779
  • 9080
  • 9081
  • 9000
  • 9180
recklessop /
Last active Feb 21, 2019
multi-threaded daily stats table generator
import pymysql.cursors
import threading
import time
import queue
import multiprocessing
exitFlag = 0
recklessop /
Created Feb 21, 2019
requirements for for zplanner
sudo apt install python3-pip3 -y
sudo pip install pymysql.cursors
recklessop / dailstats.sql
Created Feb 20, 2019
daily stats table structure
View dailstats.sql
-- phpMyAdmin SQL Dump
-- version
-- Host: localhost
-- Generation Time: Feb 20, 2019 at 04:11 PM
-- Server version: 5.7.24-0ubuntu0.16.04.1
-- PHP Version: 7.0.32-0ubuntu0.16.04.1
recklessop / dailystats.php
Last active Feb 20, 2019
dailystats.php for zplanner
View dailystats.php
$connect = mysqli_connect("localhost","root","Zertodata1!");
mysqli_select_db($connect,"zerto"); //select the table
$query = "SELECT name FROM `vms` WHERE monitor = 'Y'";
$vms = mysqli_query($connect, $query) or die (mysqli_error($connect));
$query = "SELECT datestamp FROM `stats` GROUP BY datestamp DESC";
$dateresult = mysqli_query($connect, $query) or die (mysqli_error($connect));
recklessop /
Last active Sep 23, 2019
import yaml
import psutil
# function to validate it an IP address is real, or NA to skip (used for NS2)
def validate_ip(s):
if s.upper() == "NA":
return True
a = s.split('.')
recklessop / Wireguard-Notes
Last active Jan 28, 2019
Wireguard Notes
View Wireguard-Notes
One step keygen:
umask 077 # This makes sure credentials don't leak in a race condition.
wg genkey | tee privatekey | wg pubkey > publickey
Manual steps:
wg genkey
echo <private key> | wg pubkey
View gist:c3418b24e50e0e94ac1e33e55a843f7a

1. Clone your fork:

git clone

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://
git fetch upstream