I hereby claim:
- I am cboddy on github.
- I am cboddy (https://keybase.io/cboddy) on keybase.
- I have a public key whose fingerprint is 42EC 5971 1C62 640B 1739 7F3C FC8C 3F6C C16B BCCA
To claim this, I am signing this object:
#!/usr/bin/env python3 | |
import subprocess | |
from typing import Tuple | |
import tempfile | |
import argparse | |
def to_concat_input(from_to_seconds: Tuple[Tuple[int]], in_path: str) -> str: |
#!/bin/bash | |
set -eu -o pipefail | |
# Check if your external IP address is in an Openvpn client | |
# config file. | |
# | |
# | |
# Usage: ./is_connected_via_openvpn.sh [openvpn-vpn-config-path] | |
# Defaults to checking /etc/openvpn/*.conf | |
# |
#!/usr/bin/env python3 | |
import argparse | |
import collections | |
import sys | |
import glob | |
from typing import * | |
from xml.dom import minidom | |
TestCase = collections.namedtuple("TestCase", ["class_name", "test_name", "time"]) |
#!/usr/bin/env python3 | |
import urllib.request | |
import json | |
import sys | |
import argparse | |
# Used in https://coronavirus.data.gov.uk | |
URL='https://c19downloads.azureedge.net/downloads/data/ltlas_latest.json' |
import java.util.HashMap; | |
import java.util.Map; | |
import java.util.stream.Collectors; | |
public class WTF_JAVAC { | |
private static final Map<String, String> MAP = new HashMap<>(); | |
private static final String HELP = "\n"+ MAP.entrySet().stream() | |
.sorted() | |
.map(e -> { | |
String s = e.getKey() + "\t:\t" + e.getValue(); |
#!/bin/bash | |
# compile a java source file and run it | |
# | |
# two options: | |
# 1. Add to interactive environment | |
# | |
# > source jscript.sh. | |
# (or do the above in ~/.bashrc) | |
# to make the function jscript available eg. | |
# > jscript HelloWorld.java |
# usage: | |
# ./with_logger.sh path_to_project_src | |
# | |
for f in `find $1 -type f -name \*java |xargs grep -l System.out`; | |
do | |
echo $f | |
# add import statement after package declaration | |
sed -i '0,/package.*/s//&\nimport java.util.logging.*;/' $f | |
# add Logger instance after class declaration | |
sed -i '0,/.*class [a-zA-Z]\+.*/s//&\n\tprivate static final Logger LOG = Logger.getLogger(Logger.GLOBAL_LOGGER_NAME);/' $f |
#!/bin/bash | |
# | |
# add to ~/.bashrc or similar | |
# | |
# usage: | |
# | |
# > cbor_print /path/to/my/file.cbor | |
function cbor_print() { | |
# pretty print the contents of a file of cbor-encoded data |
I hereby claim:
To claim this, I am signing this object: