Skip to content

Instantly share code, notes, and snippets.


Chris Stefano virtualstaticvoid

View GitHub Profile
We couldn’t find that file to show.
View git-use-main
git remote set-head origin main
git branch -m master main
virtualstaticvoid / git-reset-branch
Created Feb 9, 2021
Resets a git branch, or switches over from master to main.
View git-reset-branch
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 / .gitignore
Last active Jan 2, 2021
Raspberry Pi 4 Ubuntu 20.04.1 LTS configuration and provisioning script
View .gitignore
virtualstaticvoid / shell
Created Jul 8, 2020
Get Docker Container IP Address
View shell
docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' container
virtualstaticvoid / install-ca-certificate
Created Jul 2, 2020
Install Custom CA Certificate (with name check)
View install-ca-certificate
sudo mkdir -p /usr/local/share/ca-certificates
sudo cp $cert /usr/local/share/ca-certificates/
sudo update-ca-certificates
virtualstaticvoid / Ensure.cs
Last active Nov 14, 2018
C# Ensure for Argument Errors
View Ensure.cs
// MIT License
// Copyright (c) 2009 Chris Stefano <>
using System;
using System.Diagnostics;
internal static class Ensure
virtualstaticvoid / .gitignore
Last active Oct 23, 2018
virtualstaticvoid / .gitignore
Last active Mar 19, 2018
Heroku Buildpack R - rJava Example
View .gitignore
virtualstaticvoid / .r-version
Last active Jul 22, 2020
Heroku Buildpack R - plumber Example