Skip to content

Instantly share code, notes, and snippets.

View SVN-to-GitHub.bash
#!/bin/bash
# ----------------------------------------------------------------------------
# SVN-to-GitHub.bash
# ----------------------------------------------------------------------------
export SVNREPO="$1"
export GITPERLLIB=/usr/local/Cellar/git/2.35.1/share/perl5:/usr/local/lib/perl5/site_perl/5.30.3/darwin-thread-multi-2level
SOURCE=${BASH_SOURCE[0]}
while [ -h "${SOURCE}" ]; do
@allen-ball
allen-ball / settings.py
Last active Feb 8, 2022
`.grip/settings.py` for https://github.com/joeyespo/grip that populates USERNAME and PASSWORD from invoking `git credential fill` with I/O through a pipe. See https://blog.hcf.dev/article/2021-07-27-grip.
View settings.py
# .grip/settings.py
# Uses "git credential fill" to populate USERNAME and PASSWORD
def git_credential_fill():
import subprocess
argv = ["git", "credential", "fill"]
process = subprocess.Popen(argv, text = True, stdin = subprocess.PIPE, stdout = subprocess.PIPE, stderr = subprocess.PIPE)
output = process.communicate(input = "protocol=https\nhost=github.com\n")[0].strip()
map = dict(item.split("=") for item in output.splitlines())