Skip to content

Instantly share code, notes, and snippets.

View cnelson's full-sized avatar

Chris Nelson cnelson

View GitHub Profile
#!/usr/bin/env python
import re
import subprocess
import yaml
import datetime
since=datetime.datetime(2017, 2, 28, 0, 0, 0)
#!/usr/bin/env python3
import re
import requests
import subprocess
import yaml
buildpacks = {}
bpack_info = subprocess.check_output(['cf', 'buildpacks'])
for item in bpack_info.decode('utf-8').split("\n"):
package main
import (
"bufio"
"bytes"
"fmt"
"io/ioutil"
"log"
"net/http"
"os/exec"
#!/usr/bin/env python3
import datetime
import json
import os
import subprocess
import yaml
import marshmallow as ma
import requests
#!/bin/bash
if [ "$#" -ne 2 ]; then
echo "USAGE: $0 <APP_NAME> <PORT>"
echo "Replicate the behaivor of cf ssh on a port not advertised by /v2/info"
echo "https://docs.cloudfoundry.org/devguide/deploy-apps/ssh-apps.html#other-ssh-access"
exit 99
fi
set -eu
@cnelson
cnelson / bif.go
Created January 28, 2023 01:10
Golang packer / unpacker for the Roku BIF format
package main
import (
"encoding/binary"
"fmt"
"io"
"io/fs"
"os"
"path/filepath"
"strings"