View time_slicer.py
#!/usr/bin/env python
#coding: utf-8
#python 2.7
# for use with android app Timesheet https://play.google.com/store/apps/details?id=com.rauscha.apps.timesheet&hl=en
import json
import logging
import sys
import argparse
import csv
View kill_pid_port.bat
#Open command prompt and run the following commands, works in poweshell
netstat -o -n -a | findstr 0.0:3000
# TCP 0.0.0.0:3000 0.0.0.0:0 LISTENING 3116
taskkill /F /PID 3116
View capture_all.py
from cStringIO import StringIO
class Capturing(list):
def __enter__(self):
self._stdout = sys.stdout
self._stderr = sys.stderr
sys.stdout = self._stringio = StringIO()
sys.stderr = self._stringio
return self
View docker_travis.md

Creating and shipping the Docker image

In the after_success section of the .travis.yml file, we log on Docker Hub registry, then we build the image.

We also tag the generated image with:

the short git commit hash the travis build number latest if it is the master branch, otherwise the name of the branch And finally we push it on the Docker Hub registry

View generate_model.py
#!/usr/bin/env python
# coding: utf-8
import sys
import json
import re
import traceback
def load_model(model_file):
model = {}
with open(model_file, 'r') as f:
View OktaGetpublickeyNimbus.java
/**
Okta provides the kid field in the header part of the JWT token.
**/
PublicKey loadKey(String keyId) {
try {
JSONObject key = getProviderRSAJWK(
retrieveOIDCProviderMetadata().getJWKSetURI().toURL().openStream(),
keyId);
View docker_bash.sh
#!/bin/bash
export DOCKER_HOST=tcp://192.168.99.101:2376
export DOCKER_CERT_PATH=/Users/claytongraham/.docker/machine/machines/default
export DOCKER_TLS_VERIFY=1
View create_docker_machine.sh
$ docker-machine create --driver virtualbox --virtualbox-disk-size "32000" default
View docker_bash.sh
$ sudo docker exec -i -t 665b4a1e17b6 /bin/bash
View fr.sh
# Recursively find and replace in files
find . -name "*.txt" -print0 | xargs -0 sed -i '' -e 's/foo/bar/g'