Skip to content

Instantly share code, notes, and snippets.

View rharkanson's full-sized avatar

Russell Harkanson rharkanson

View GitHub Profile
@rharkanson
rharkanson / sus.py
Created October 7, 2020 20:29
who dunnit??
#!/usr/bin/env python3
from os import getenv
from random import choices, shuffle, randint
from argparse import ArgumentParser
import curses
CHAR_FRAMES=['ඞ','ඬ','ඩ','ඕ']
STARS={
@rharkanson
rharkanson / dns-test
Created September 3, 2019 04:12
Ping many DNS servers (in batches) and print sorted table of results
#!/usr/bin/env bash
# Russell Harkanson - 2019
# dns-test
# Ping many DNS servers (in batches) and print sorted table of results
#
# usage: ./dns-test [C] [S] [N]
# C - ping count for each DNS (5)
# S - sort column 1:Name 2:IP 3:Loss 4:Min 5:Avg 6:Max 7:StDev (5)
# N - parallel operations at once (4)
@rharkanson
rharkanson / RandomBigInteger.cs
Created March 1, 2017 01:35
RandomBigInteger - An extension to the C# Random class for generating random BigIntegers
using System;
using System.Numerics;
namespace System.Numerics
{
class RandomBigInteger : Random
{
public RandomBigInteger() : base()
{
}
@rharkanson
rharkanson / backupscript
Created November 12, 2016 06:14
A modified backup script that removes deleted files older than 30 days, from https://www.youtube.com/watch?v=tG4Tge11GOo
#!/bin/bash
rsync -rlpgoD -progress /Volumes/Storage01/pictures /Volumes/Backup01
find /Volumes/Backup01/* -mtime +30 -exec rm {} \;