Skip to content

Instantly share code, notes, and snippets.

@cboddy
cboddy / junit_test_report_time_checker.py
Created March 12, 2021 20:50
A CI check to read a Junit test report and raise an error if the time exceeds a threshold.
#!/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"])
#!/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
#
@cboddy
cboddy / ffmpeg_concat_cut.py
Created November 9, 2023 22:15
Wrap ffmpeg to concat parts of a video file together using ffmpeg
#!/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:
function CreateAndSetTags()
exec ':!ctags -R --languages=python -o tags $VIRTUAL_ENV `git rev-parse --show-toplevel`'
set tags=./tags,tags
endfunction
nmap <silent> <F4> :call CreateAndSetTags()<CR>
" C-], tn, tb, F4