Skip to content

Instantly share code, notes, and snippets.

View virtualstaticvoid's full-sized avatar

Chris Stefano virtualstaticvoid

View GitHub Profile
@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
@virtualstaticvoid
virtualstaticvoid / git-reset-branch
Created February 9, 2021 13:37
Resets a git branch, or switches over from master to main.
#!/bin/bash
set -e
#
# NOTE: can be used to switch over to another branch such from "master" to "main"
#
# git reset-branch main origin/main
#
if [ ! -d .git ]; then
@virtualstaticvoid
virtualstaticvoid / .gitignore
Last active January 2, 2021 18:17
Raspberry Pi 4 Ubuntu 20.04.1 LTS configuration and provisioning script
*.xz
*.zip
mnt/*
@virtualstaticvoid
virtualstaticvoid / shell
Created July 8, 2020 16:22
Get Docker Container IP Address
docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' container