Skip to content

Instantly share code, notes, and snippets.

View eeichinger's full-sized avatar

Erich Eichinger eeichinger

View GitHub Profile

Keybase proof

I hereby claim:

  • I am eeichinger on github.
  • I am eeichinger (https://keybase.io/eeichinger) on keybase.
  • I have a public key ASDxtzTW3lx3A2x-vRF-8yIANoqhSNzFcuSP2Hc6Ok9xuwo

To claim this, I am signing this object:

@eeichinger
eeichinger / clone-repos-generate.sh
Last active December 27, 2023 10:12
Generate a script to clone all repos within a specific project from bitbucket server and bitbucket cloud
# generate a script ./clone-repos.sh from a list of repos fetched via Bitbucket API
# note: requires 'curl' and 'jq' to be installed
set -e
echo -n '' > clone-repos.sh
chmod +x clone-repos.sh
ONPREM_USER=xxxxx
ONPREM_PASS=......
# from https://stackoverflow.com/questions/22734401/base64-encode-decode-to-from-files-in-chunks-with-python-2-7
#
# write_base64_file_from_file
# write_file_from_base64_file
# - must run with python 2.7
# - must process data in chunks to limit memory consumption
# - base64 data must be JSON compatible, i.e.
# use base64 "modern" interface,
# not base64.encodestring() which contains linefeeds
#
@eeichinger
eeichinger / Makefile
Created April 3, 2019 10:12
Makefile 'init' target for setting up a virtual python environment (using pyenv)
# automatically initialise a local python env
# requires:
# - pyenv installed (see https://github.com/pyenv/pyenv)
# - ./requirements.txt to manage dependencies via pip
PYENV_VERSION:="3.7.2"
all: init
.PHONY: clean