Skip to content

Instantly share code, notes, and snippets.

View virtualstaticvoid's full-sized avatar

Chris Stefano virtualstaticvoid

View GitHub Profile
@virtualstaticvoid
virtualstaticvoid / make-ssh-key
Created January 28, 2026 09:50
Make SSH key with email
#!/bin/bash
set -e
email=$1
usage() {
echo "Usage: $0 <email>"
}
if [ -z "${email}" ]; then
@virtualstaticvoid
virtualstaticvoid / make-gpg-key.sh
Created January 28, 2026 09:50
Create a GPG key with name and email
#!/bin/bash
set -e
set -x
email=$1
name=$2
usage() {
echo "Usage: $0 <email> <name>"
}
@virtualstaticvoid
virtualstaticvoid / example.py
Last active January 16, 2026 09:48
Django Run Script Management Command
#
# execute using the Django `runscript` management command
#
# > python manage.py runscript <script.py>
#
import argparse
import logging
from typing import List, TYPE_CHECKING
@virtualstaticvoid
virtualstaticvoid / clear-indexed-db.js
Created September 6, 2023 08:50
Clear Browser's IndexedDB
window.indexedDB.databases().then((r) => {
for (var i = 0; i < r.length; i++) window.indexedDB.deleteDatabase(r[i].name);
}).then(() => {
alert('Browser IndexedDB cleared.');
});
@virtualstaticvoid
virtualstaticvoid / git-sync
Last active September 1, 2022 13:28
git-sync
#!/bin/bash
#
# Description:
#
# Synchronises the local repository with _all_ the configured remotes
#
# Optionally, it will safely perform a rebase of the checked out branch
# with it's corresponding tracking (remote) branch
#
@virtualstaticvoid
virtualstaticvoid / git-reset-branch
Last active September 1, 2022 13:26
git-reset-branch
#!/bin/bash
#
# Description:
#
# Resets the local branch which has diverged from it's tracking (remote) branch
# can also be used to switch over from "master" to "main" branch
#
# Usage:
#
@virtualstaticvoid
virtualstaticvoid / Dockerfile
Last active September 1, 2022 13:17
Using `XGBoost` on Heroku
FROM virtualstaticvoid/heroku-docker-r:build
CMD ["/usr/bin/R", "--no-save", "-f", "/app/app.R"]
@virtualstaticvoid
virtualstaticvoid / README.md
Last active February 1, 2022 10:36
Heroku Buildpack R Issue #156
@virtualstaticvoid
virtualstaticvoid / .a-heroku-buildpack-r-issue-142
Last active October 2, 2021 13:42
heroku-buildpack-r issue #142
We couldn’t find that file to show.
@virtualstaticvoid
virtualstaticvoid / git-use-main
Created April 14, 2021 19:21
master to main branch
#!/bin/bash
git remote set-head origin main
git branch -m master main