Skip to content

Instantly share code, notes, and snippets.

View devinrhode2's full-sized avatar
😀

Devin Rhode devinrhode2

😀
View GitHub Profile
import { globby } from 'globby'
import pMap from 'p-map'
import execa from 'execa'
// typical high end is about 350mb (based on watching "xo" processes inside Activity Monitor)
// ~~lets go with 400mb to be safe~~
// Since we are grouping files together - we should have less oveerhead
// (node, yarn, xo wrapper, eslint wrapper, 1 ts process?) - lets go with just 350.
const TYPICAL_XO_MEMORY_USAGE = 0.35
@devinrhode2
devinrhode2 / safeCall.ts
Last active December 30, 2022 20:23
safely call function, and return `returnValue | Error` https://www.swyx.io/errors-not-exceptions
/**
* Calls `callback`, catches any errors and returns `returnValue | Error`
*
* TODO: create npm package
*
* See: https://dev.to/devinrhode2/comment/1fcga
*/
export const safeCall = <
TCallback extends (
...args: unknown[]
@devinrhode2
devinrhode2 / misc.md
Created April 14, 2021 23:32
notes to self thread

asdf

@devinrhode2
devinrhode2 / note.md
Last active March 11, 2021 20:12
normalize a 0xa0 non-breaking space character to ascii compatible encoding. For error

Unable to parse JSON and generate JSONx: illegal character 0xa0 at offset 7164 of

DataPower issue

@devinrhode2
devinrhode2 / cloudSettings
Last active November 5, 2021 18:07
cloudSettings
{"lastUpload":"2021-11-05T18:07:14.610Z","extensionVersion":"v3.4.3"}
in bitbucket, turn on notifications for all pushes...
or somehow be notified of pushes to a branch, or something
basically, pushed commits could imply "this is ready for review"
and then others can review them
I think it might be easier to review commits one by one spaced out over time
assumes you have a worktree for each co-worker, each co-worker is focused on one branch at a time
whole thing could be in a dropbox, everything syncs, no need to ever git push/pull..
@devinrhode2
devinrhode2 / fractal representation of git history.md
Last active October 11, 2020 03:47
fractal representation of git history

A squash merge will merge a branch, but leave behind a commit log of the squashed commits. So, inside of a squash merge commit, you have a message like:

Merge branch foo into bar

commit 1861807 (HEAD -> feature-1234)
Author: D.R <D.R@company.com>
Date:   Thu 09:05

 refactor(registraton/noop): no-op tweak (move hasWelcomeMessage)
@devinrhode2
devinrhode2 / install.rb
Last active December 22, 2023 06:11 — forked from aubguillemette/install.rb
Homebrew without sudo-Aub's fork with a few minor changes from kenchan's fork
#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby
# chmod +x install.rb
# ./install.rb
YOUR_HOME = ENV['HOME']
HOMEBREW_PREFIX = "#{YOUR_HOME}/usr/local"
system "mkdir -p #{HOMEBREW_PREFIX}"
HOMEBREW_CACHE = "#{YOUR_HOME}/Library/Caches/Homebrew"
HOMEBREW_REPO = 'https://github.com/Homebrew/brew'
@devinrhode2
devinrhode2 / install.rb
Last active September 28, 2020 02:32 — forked from skyl/install.rb
Homebrew without sudo
#!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby
# chmod +x install.rb
# ./install.rb
YOUR_HOME = ENV['HOME']
HOMEBREW_PREFIX = "#{YOUR_HOME}/usr/local"
system "mkdir -p #{HOMEBREW_PREFIX}"
HOMEBREW_CACHE = "#{YOUR_HOME}/Library/Caches/Homebrew"
HOMEBREW_REPO = 'https://github.com/Homebrew/brew'
@devinrhode2
devinrhode2 / .gitattributes_global
Created September 1, 2020 03:33
git config settings
# from here:
# https://medium.com/@pablorsk/be-a-git-ninja-the-gitattributes-file-e58c07c9e915
# package-lock.json
# yarn.lock
build/** -diff
# from here: https://github.com/alexkaratarakis/gitattributes/blob/master/Web.gitattributes
# with a few extra bits from here: https://rehansaeed.com/gitattributes-best-practices/
## GITATTRIBUTES FOR WEB PROJECTS