from https://twitter.com/benawad/status/1227744300085260289
if you have both:
home/index.js home.js
then you try to import like this:
require('./home')
[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) |
[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) |
{"lastUpload":"2020-08-31T23:28:32.305Z","extensionVersion":"v3.4.3"} |
// 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 |
[core] | |
excludesfile = ~/.gitignore_global | |
editor = code --wait | |
pager = cat | |
ignorecase = false | |
[user] | |
email = devinrhode2@gmail.com | |
name = devinrhode2 | |
[merge] | |
tool = code |
from https://twitter.com/benawad/status/1227744300085260289
if you have both:
home/index.js home.js
then you try to import like this:
require('./home')
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.
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: |