Skip to content

Instantly share code, notes, and snippets.


Devin Rhode devinrhode2

Block or report user

Report or block devinrhode2

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View global .gitconfig
excludesfile = ~/.gitignore_global
editor = code --wait
pager = cat
ignorecase = false
email =
name = devinrhode2
tool = code
devinrhode2 /
Last active Feb 13, 2020
answer to bens quiz question
View How I

First, run a vanilla git rebase. Then in vs code... "Undo" all commits you may want to modify. (in git sidebar, there's a "..." button with a ton of git related actions) From here, you would use vscode git diff editor/viewer, and highlight chunks of code to stage. From there it's personal opinion as to exactly how to group the code changes into one or a series of commits.

devinrhode2 /
Created Jan 4, 2020
Some submodule post-checkout and post-merge scripts+dump of submodule notes

In your package.json scripts... add these without newlines/escapes

    "submodulePostCheckoutCorrectDetachedHeads": "
    git submodule sync --recursive &&
    git submodule update --checkout &&
    git submodule foreach \
        git branch -r --contains `git log -1 --pretty=format:\"%h\"`
       ) node $toplevel/dev-scripts/checkout_right_branch $sm_path'", // end submodule post-checkout
    "submodulePostMergeUpdateSubmoduleMerge": "
devinrhode2 / cloudSettings
Last active Dec 19, 2019
Visual Studio Code Settings Sync Gist
View cloudSettings
View Always securely use square brackets.js
const safeGet = (obj, key) => {
if (obj[key] == null) obj[key];
if (typeof obj[key] === 'function') {
throw new Error('Cannot safely get '+key+' since it a function. Use square bracket syntax to directly access instead.');
if (, key)) {
return obj[key];
} else {
// This console log could be rather buggy:
devinrhode2 /
Created Sep 29, 2019 — forked from infval/ download workaround (Most games + Sega Dreamcast, Books/Comics/Guides/Magazines)
// ==UserScript==
// @name EmuParadise Download Workaround
// @version 1.2.2
// @description Replaces the download button link with a working one
// @author infval (Eptun)
// @match*/*/*
// @grant none
// ==/UserScript==
devinrhode2 / get-env-var.js
Last active Sep 25, 2019
attempt to try and change environment variables used in .eslintrc.js for CRA dev server without restarting the dev server
View get-env-var.js
/* Usage:
const initGetEnv = require('./dev-scripts/get-env-var.js');
const env = initGetEnv({
useLiveEnv: typeof process.env.USE_LIVE_ENV !== 'undefined'
if (env('foobar')) doSomething();
// The idea is that you'd be able to change variables on the fly by editing the file.
View getIEVersionInt
formatting for 1st answer on
const ieVersionInt = (function getIEVersionInt(){
var rv = -1; // Return value assumes failure.
if (navigator.appName == 'Microsoft Internet Explorer') {
let ua = navigator.userAgent,
re = new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})");
if (re.exec(ua) !== null){
devinrhode2 / .zshrc
Created Apr 18, 2019
highlights from my zshrc
View .zshrc
# Make this your ~/.zshrc file and make sure to do the zgen install steps here:
# You'll also need to change the default shell to zsh:
export PATH=$PATH:/Users/rhoded/Desktop/Archive2/Visual\ Studio\
ulimit -n 10240 unlimited
You can’t perform that action at this time.