Skip to content

Instantly share code, notes, and snippets.

@dewdad
dewdad / generate-ssh-key.sh
Created May 12, 2020 08:35 — forked from grenade/01-generate-ed25519-ssh-key.sh
Correct file permissions for ssh keys and config.
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/id_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/github_rsa
ssh-keygen -t rsa -b 4096 -N '' -C "[email protected]" -f ~/.ssh/mozilla_rsa
#################
# Initial Setup #
#################
#The command to run, built from the raw link of this gist
#START http://boxstarter.org/package/nr/url?https://gist.githubusercontent.com/dewdad/56f9818c123ad984afbcfba90eb18359/raw/1d094bd48f488085807babd71456db9794e64ea9/RegUserBoxstarter.ps1
#As described here: http://boxstarter.org/Learn/WebLauncher
#########################################
@dewdad
dewdad / monorepo-tool-comparison.md
Created August 8, 2019 07:35 — forked from morewry/monorepo-tool-comparison.md
Comparison of Monorepo Tools For Web Client / Front End Projects (That Probably Use HTML, CSS, and JS)

Mono Repository Tool Comparison

For Web Client / Front End Projects

(That Probably Use HTML, CSS, and JS)

I made a list of 20 things I might want out of a monorepo tool for a Design System to use as a basis for comparing some of the options including Lerna, Northbrook, and Rush.

⚠️ Northbrook's author says the project is pretty dead and now uses Lerna.

Qualifications Wanted

@dewdad
dewdad / es6-element-ready.js
Created July 14, 2019 20:14 — forked from jwilson8767/es6-element-ready.js
Wait for an element to exist. ES6, Promise, MutationObserver
/**
* Waits for an element satisfying selector to exist, then resolves promise with the element.
* Useful for resolving race conditions.
*
* @param selector
* @returns {Promise}
*/
export function elementReady(selector) {
return new Promise((resolve, reject) => {
let el = document.querySelector(selector);
@dewdad
dewdad / vsCodeGitMac.txt
Created June 3, 2019 07:04 — forked from jackhickey/vsCodeGitMac.txt
Enabled vscode as your git editor on mac
# Inside of vscode open the command pallete and run '>shell command install code in path' or something along those lines...
git config --global core.editor "code --wait"
git config --global -e
(add the lines below inside in the git config...)
@dewdad
dewdad / debloatNox.md
Created April 18, 2019 11:59 — forked from Log1x/debloatNox.md
Debloating & Optimizing Nox

Debloating Nox

Nox, despite being the most feature-filled Android emulator, has a lot of negativity surrounding it due to their antics when it comes to making income off of their program. It is known for running repeated advertisments in the background, calling home and passing along system information (outside of your Android instance) as well as a vast amount of potentially sensitive data in an encrypted payload back to their multitude of servers. With the following preventitive measures, we can stop a majority of this happening as well as greatly improve the overall performance.

  1. Download and Install a fresh copy of Nox. The latest version is fine (for now). If you already have it installed, that is fine too. No need to reinstall.

  2. Enable Root Mode on Nox by clicking the gear icon and then checking the Root Startup box.

  3. Install a new Launcher from the Play Store. ANYTHING but Nox's default. I suggest [Nova Launcher](https://play.google.com/s

@dewdad
dewdad / FiddlerScript.cs
Created March 22, 2019 19:46 — forked from antelle/FiddlerScript.cs
Change response in Fiddler
static function OnBeforeRequest(oSession: Session) {
if (oSession.RequestMethod == 'GET' && oSession.PathAndQuery.IndexOf('part_of_your_url') > 0) {
oSession.utilCreateResponseAndBypassServer();
oSession.oResponse.headers.HTTPResponseCode = 401;
oSession.oResponse.headers.HTTPResponseStatus = '401 Not Authorized';
oSession.oResponse.headers['Access-Control-Allow-Origin'] = '*';
oSession.utilSetResponseBody('response_body');
}
}
@dewdad
dewdad / GitForWindowsSetup.md
Created February 18, 2019 09:50 — forked from dmangiarelli/GitForWindowsSetup.md
How to setup SSH with Git for Windows

How to setup Git for Windows

I know this document seems long, but it shouldn't be too difficult to follow. This guide is based on Windows, but every program here has Linux/Mac equivalents, and in most cases they're built-in. So, take a deep breath and go step by step.

The steps below are for GitHub, but the steps are almost idential for Bitbucket, Heroku, etc.

You'll probably want to make sure Chocolatey is installed, since it streamlines installing this stuff later. If you install via Chocolatey, you don't need to run the installers from the products' respective sites.

Cmder / ConEmu

@dewdad
dewdad / interceptors.js
Created June 10, 2018 11:30 — forked from javisperez/interceptors.js
Axios interceptor for cache with js-cache
// Usually I use this in my app's config file, in case I need to disable all cache from the app
// Cache is from `js-cache`, something like `import Cache from 'js-cache';`
const cacheable = true,
cache = new Cache();
// On request, return the cached version, if any
axios.interceptors.request.use(request => {
// Only cache GET requests
if (request.method === 'get' && cacheable) {