Skip to content

Instantly share code, notes, and snippets.

View kelbyludwig's full-sized avatar
💯
💯💯💯

Kelby Ludwig kelbyludwig

💯
💯💯💯
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kelbyludwig
kelbyludwig / global_ping.sh
Created March 28, 2021 18:28
This script prints ping rollup statistics against various Vultr hosts in specific locations.
#!/bin/sh
# This script runs $N pings against various Vultr hosts in specific locations.
N=5
ping_cleaned () {
ping -q -c $N $1 | grep 'ping statistics' --color=never -A 2 || break
echo ""
}
@kelbyludwig
kelbyludwig / ggh.sage
Created December 17, 2016 23:53
GGH and Lattice Helpers
class GGHKeyPair:
def __init__(self, n=2, d=128, high_ratio_req=0.8, low_ratio_req=0.3):
self.generate(n, d, high_ratio_req, low_ratio_req)
self.n = n
# set_keypair can be used to set specific matrices for the public
# and private GGH keys.
def set_keypair(self, priv, pub):
self.public_key = pub
@kelbyludwig
kelbyludwig / CE.java
Last active December 7, 2016 03:05
java runtime exec
import java.io.*;
public class CE {
public static void readOutput(Process proc) throws IOException {
System.out.println("--- read output:");
InputStream is = proc.getInputStream();
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);