- iTerm2 - If you want to customise your terminal
- BetterTouchTool - Actually makes your touchbar useful
- Rambox - Puts all your chat apps and emails into one convenient place
- IntelliJ - IDE of choice
- VSCode - If you don't want an IDE but still want to get shit done
- Sublime Text - Better than Notes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function replaceMe(template, data) { | |
const pattern = /{\s*(\w+?)\s*}/g; // {property} | |
return template.replace(pattern, (_, token) => data.hasOwnProperty(token) ? data[token] : ''); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[includeIf "gitdir:~/Code/Personal/"] | |
path = ~/Code/Personal/.gitconfig-personal | |
[includeIf "gitdir:~/Code/Work/"] | |
path = ~/Code/Work/.gitconfig-work |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# in ~/.gitconfig | |
[alias] | |
... ... ... # your existing aliases | |
pt = !git tag -l | xargs git tag -d && git fetch -t |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
// Use IntelliSense to learn about possible attributes. | |
// Hover to view descriptions of existing attributes. | |
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | |
"version": "0.2.0", | |
"configurations": [ | |
{ | |
"type": "node", | |
"request": "attach", | |
"name": "Attach to Nest Framework", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://blog.klipse.tech/javascript/2021/02/26/structural-sharing-in-javascript.html | |
function deepFreeze(object) { | |
const propNames = Object.getOwnPropertyNames(object); | |
// Freeze properties before freezing self | |
for (const name of propNames) { | |
const value = object[name]; | |
if (value && typeof value === "object") { | |
deepFreeze(value); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Animal = (name, type) => { | |
this.name = name | |
this.type = type | |
this.age = 0 | |
} | |
Animal.prototype.birthday = function () { | |
this.age++ | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getBodyScrollTop() { | |
const el = document.scrollingElement || document.documentElement; | |
return Math.max(window.pageYOffset, el.scrollTop); | |
} |
NewerOlder