Skip to content

Instantly share code, notes, and snippets.

View devinrhode2's full-sized avatar
😀

Devin Rhode devinrhode2

😀
View GitHub Profile
@devinrhode2
devinrhode2 / GitLens.normal-vscode.txt
Created September 1, 2020 03:02
normal vscode debug output
[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)
@devinrhode2
devinrhode2 / GitLens.txt
Created September 1, 2020 02:09
vscode-insiders output
[2020-09-01 02:07:47:814] [1] GitService.initialize
[2020-09-01 02:07:47:814] [2] GitService.getBuiltInGitApi
[2020-09-01 02:07:47:901] [2] GitService.getBuiltInGitApi completed • 87 ms
[2020-09-01 02:07:47:918] Git found: 2.28.0 @ /usr/local/bin/git • 16 ms
[2020-09-01 02:07:47:918] [1] GitService.initialize completed • 104 ms
[2020-09-01 02:07:47:920] Starting repository search in 1 folders
[2020-09-01 02:07:47:921] [3] GitService.repositorySearch(/Users/devinrhode2/repos/react) searching (depth=1)...
[2020-09-01 02:07:47:922] [4] GitService.getRepoPathCore — e=/Users/devinrhode2/repos/react, t=true
[2020-09-01 02:07:47:927] [5] GitUri.fromUri — e=Uri(file:///Users/devinrhode2/repos/react/packages/react/index.classic.fb.js)
[2020-09-01 02:07:47:927] [6] GitService.getRepoPath — e=Uri(file:///Users/devinrhode2/repos/react/packages/react/index.classic.fb.js)
@devinrhode2
devinrhode2 / cloudSettings2
Last active September 25, 2020 20:05
asdf
{"lastUpload":"2020-08-31T23:28:32.305Z","extensionVersion":"v3.4.3"}
@devinrhode2
devinrhode2 / generateMouseEventHandler.js
Last active May 4, 2020 22:12
discover coordinates for a cypress manual coordinate click
// paste this into a file like location-map-component.js:
if (typeof window !== 'undefined') {
window.addEventListener('mousemove', (e) => {
console.log(
'x', e.x,
'y', e.y,
'ofsX', e.offsetX,
'ofsY', e.offsetY,
'cursor:', document.getElementsByClassName('MicrosoftMap')[0].style.cursor || '""',
{ el: e.target }
vscode
iterm2
- option/alt key sends Esc+
- option left arrow https://coderwall.com/p/h6yfda/use-and-to-jump-forwards-backwards-words-in-iterm-2-on-os-x
zsh stuff
gitignore
git ssh
https://support.mozilla.org/en-US/questions/1113500
@devinrhode2
devinrhode2 / global .gitconfig
Created March 24, 2020 00:54
global .gitconfig
[core]
excludesfile = ~/.gitignore_global
editor = code --wait
pager = cat
ignorecase = false
[user]
email = devinrhode2@gmail.com
name = devinrhode2
[merge]
tool = code
@devinrhode2
devinrhode2 / answer-to-bens-quiz-question.md
Last active February 13, 2020 00:14
answer to bens quiz question
@devinrhode2
devinrhode2 / How I rebase.md
Created February 12, 2020 17:03
How I rebase

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
devinrhode2 / dump.md
Created January 4, 2020 18:45
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 \
      'latest_commits_remote_branch=$(\
        git branch -r --contains `git log -1 --pretty=format:\"%h\"`
       ) node $toplevel/dev-scripts/checkout_right_branch $sm_path'", // end submodule post-checkout
 "submodulePostMergeUpdateSubmoduleMerge": "
// 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: