Skip to content

Instantly share code, notes, and snippets.

View russau's full-sized avatar

Russ Sayers russau

View GitHub Profile
@russau
russau / words_per_min.ipynb
Last active November 10, 2019 18:07
Notebook words_per_min
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
"""
Before you run this establish an SSH tunnel to the postgres database:
ssh -L 5432:localhost:5432 [email protected]
"""
import boto3
import pprint
import sys
import psycopg2
import hashlib
@russau
russau / code-lock.sh
Last active September 18, 2019 17:59
#!/bin/bash -ex
# force all the extensions to update
code --install-extension vscjava.vscode-java-pack --force && \
code --install-extension ms-azuretools.vscode-docker --force && \
code --install-extension ms-python.python --force && \
code --install-extension ms-vscode.csharp --force && \
code --install-extension redhat.java --force && \
code --install-extension VisualStudioExptTeam.vscodeintellicode --force && \
code --install-extension vscjava.vscode-java-debug --force && \
@russau
russau / vm-patch.sh
Last active September 18, 2019 00:08
#!/bin/bash
ver=${ver-0.46.0}
code --install-extension vscjava.vscode-java-pack --force && \
code --uninstall-extension vscjava.vscode-java-dependency && \
code --uninstall-extension vscjava.vscode-java-test && \
code --uninstall-extension vscjava.vscode-java-debug && \
code --uninstall-extension redhat.java
wget https://github.com/redhat-developer/vscode-java/releases/download/v${ver}/redhat.java-${ver}.vsix
code --install-extension redhat.java-${ver}.vsix
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@russau
russau / load_test_rollup.ipynb
Created May 8, 2019 01:22
load_test_rollup
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#! /bin/bash
filename="$PWD/`date +%Y%m%d`network.csv"
echo "command,date,epoch,delta_bytes,bytes" >> $filename
prev_bytes=$(cat /proc/net/dev | grep 'eth0:' | awk '/:/ { print($2) }')
function log(){
bytes=$(cat /proc/net/dev | grep 'eth0:' | awk '/:/ { print($2) }')
let delta=$bytes-$prev_bytes
prev_bytes=$bytes
human_date=$(date)
cat /proc/net/dev ; date ; docker-compose up -d ; cat /proc/net/dev ; date
https://digitransit.fi/en/developers/apis/4-realtime-api/vehicle-positions/
GTFS files https://digitransit.fi/en/developers/services/6-data-containers/routing-data/
https://developers.google.com/transit/gtfs/reference/
<prefix> /hfp/
<version>/ v1/
journey/ journey/
<temporal_type>/ ongoing/
<transport_mode>/ train/
@russau
russau / certs-create.sh
Created February 9, 2019 03:38
Fix for subjectAltName
#!/bin/bash
set -o nounset \
-o errexit \
-o verbose
# -o xtrace
# Cleanup files
rm -f *.crt *.csr *_creds *.jks *.srl *.key *.pem *.der *.p12