Skip to content

Instantly share code, notes, and snippets.

Avatar
😀

Devin Rhode devinrhode2

😀
View GitHub Profile
@devinrhode2
devinrhode2 / safeCall.ts
Last active Jun 24, 2021
safely call function, and return [returnValue, error]
View safeCall.ts
/**
* Calls `callback`, and returns `[returnValue, error]`
*
* TODO: create npm package
*
* See: https://www.swyx.io/errors-not-exceptions
*/
export const safeCall = <
// any here is actually key to getting good+proper typing on return type.
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@devinrhode2
devinrhode2 / misc.md
Created Apr 14, 2021
notes to self thread
@devinrhode2
devinrhode2 / note.md
Last active Mar 11, 2021
normalize a 0xa0 non-breaking space character to ascii compatible encoding. For error
View note.md

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

DataPower issue

View cloudSettings
{"lastUpload":"2020-12-14T00:27:32.750Z","extensionVersion":"v3.4.3"}
View code review workflow idea
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 Oct 11, 2020
fractal representation of git history
View fractal representation of git history.md

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 May 4, 2021 — forked from aubguillemette/install.rb
Homebrew without sudo-Aub's fork with a few minor changes from kenchan's fork
View install.rb
#!/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 Sep 28, 2020 — forked from skyl/install.rb
Homebrew without sudo
View install.rb
#!/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'
View .gitattributes_global
# 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
View GitLens.normal-vscode.txt
[2020-09-01 02:52:59:043] [1] GitService.initialize
[2020-09-01 02:52:59:046] [2] GitService.getBuiltInGitApi
[2020-09-01 02:52:59:252] [2] GitService.getBuiltInGitApi completed • 206 ms
[2020-09-01 02:52:59:278] Git found: 2.28.0 @ /usr/local/bin/git • 26 ms
[2020-09-01 02:52:59:278] [1] GitService.initialize completed • 232 ms
[2020-09-01 02:52:59:280] Starting repository search in 1 folders
[2020-09-01 02:52:59:280] [3] GitService.repositorySearch(/Users/devinrhode2/repos/react) searching (depth=1)...
[2020-09-01 02:52:59:280] [4] GitService.getRepoPathCore — e=/Users/devinrhode2/repos/react, t=true
[2020-09-01 02:52:59:286] [5] GitUri.fromUri — e=Uri(file:///Users/devinrhode2/repos/react/packages/react/index.classic.fb.js)
[2020-09-01 02:52:59:286] [6] GitService.getRepoPath — e=Uri(file:///Users/devinrhode2/repos/react/packages/react/index.classic.fb.js)