Skip to content

Instantly share code, notes, and snippets.

💭
profiting off the free labor of coders past... no wait company is not interested

Devin Rhode devinrhode2

💭
profiting off the free labor of coders past... no wait company is not interested
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
@devinrhode2
devinrhode2 / clean-scrollbar.css
Created May 2, 2012
Like, basically PERFECT scrollbars
View clean-scrollbar.css
/**
* Like, basically PERFECT scrollbars
*/
/*
It's pure CSS.
Since a quick google search will confirm people going crazy about Mac OS Lion scrollbars...
this has no fade-out effect.
In Mac OS Lion, the lowest common denominator is always showing scrollbars by a setting.
@devinrhode2
devinrhode2 / README.md
Last active Nov 27, 2019 — forked from tombigel/README.md
How to Change Open Files Limit on OS X and macOS Sierra (10.8 - 10.12)
View README.md

How to Change Open Files Limit on OS X and macOS

This text is the section about OS X Yosemite (which also works for macOS Sierra) from https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/#mac-os-x

The last time i visited this link it was dead (403), so I cloned it here from the latest snapshot in Archive.org's Wayback Machine https://web.archive.org/web/20170523131633/https://docs.basho.com/riak/kv/2.1.4/using/performance/open-files-limit/

Mac OS X

To check the current limits on your Mac OS X system, run:

View Always securely use square brackets.js
// WORK IN PROGRESS...
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 (Object.prototype.hasOwnProperty.call(obj, key)) {
return obj[key];
} else {
// This console log could be rather buggy:
@devinrhode2
devinrhode2 / emuparadise.download.user.js
Created Sep 29, 2019 — forked from infval/emuparadise.download.user.js
emuparadise.me download workaround (Most games + Sega Dreamcast, Books/Comics/Guides/Magazines)
View emuparadise.download.user.js
// ==UserScript==
// @name EmuParadise Download Workaround
// @version 1.2.2
// @description Replaces the download button link with a working one
// @author infval (Eptun)
// @match https://www.emuparadise.me/*/*/*
// @grant none
// ==/UserScript==
// https://www.reddit.com/r/Piracy/comments/968sm6/a_script_for_easy_downloading_of_emuparadise_roms/
@devinrhode2
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 .env.live file.
@devinrhode2
devinrhode2 / tracekit.example.markdown
Created Dec 13, 2012
A real-world example of TraceKit based on my current contract project
View tracekit.example.markdown

API

  • TraceKit.report.subscribe(function(stackInfo) { ... })
  • TraceKit.report.unsubscribe(function(stackInfo) { ... })
  • TraceKit.report(exception) (e.g. try { ...code... } catch(ex) { TraceKit.report(ex); } )

TraceKit will attempt to fetch an analyze source files, but you can turn this off using:

TraceKit.remoteFetching = false;
@devinrhode2
devinrhode2 / cloudSettings
Last active Jun 24, 2019
Visual Studio Code Settings Sync Gist
View cloudSettings
{"lastUpload":"2019-06-24T22:47:27.725Z","extensionVersion":"v3.3.0"}
View getIEVersionInt
formatting for 1st answer on https://stackoverflow.com/questions/31757852/how-can-i-detect-internet-explorer-ie-and-microsoft-edge-using-javascript/32107845
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
devinrhode2 / .zshrc
Created Apr 18, 2019
highlights from my zshrc
View .zshrc
## INSTALLATION
# Make this your ~/.zshrc file and make sure to do the zgen install steps here:
# https://github.com/tarjoilija/zgen#installation
# You'll also need to change the default shell to zsh: https://github.com/robbyrussell/oh-my-zsh#4-change-your-default-shell
export PATH=$PATH:/Users/rhoded/Desktop/Archive2/Visual\ Studio\ Code.app/Contents/Resources/app/bin
ulimit -n 10240 unlimited
export HOMEBREW_NO_ANALYTICS=1
@devinrhode2
devinrhode2 / update-your-mustache.js
Created Jul 8, 2012
Why not hookup mustache templates to auto-update?
View update-your-mustache.js
/* by Devin Rhode (@Devinrhode2)
Mustache templates are a one-time operation.
I realized this doesn't have a to be, and having them auto-update is *extremely trivial*
So, we have this mustache:
<p>Hello, {{username}}</p>
You can’t perform that action at this time.