This file contains hidden or 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
-- Usage: | |
-- Open Automator | |
-- Choose to create an "Application" | |
-- Find "AppleScript" and drag it to the right side | |
-- Copy the code below | |
-- Save the app | |
-- While holding option+command, drag the app icon to finder top toolbar | |
tell application "Finder" | |
set folderPath to quoted form of POSIX path of (the target of the front window as text) |
This file contains hidden or 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
/*! jQuery v3.6.2 | (c) OpenJS Foundation and other contributors | jquery.org/license */ | |
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,y=n.hasOwnProperty,a=y.toString,l=a.call(Object),v={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},S=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||S).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e? |
This file contains hidden or 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 save({ | |
initialInvestment = 0, | |
baseMonthly, | |
contributionChangePercentageYearly, | |
contributionChangeFn, | |
returnPercentageYearly, | |
durationYears, | |
accumulatedExpense = 0, | |
accumulatedValue = 0, | |
values = [], |
This file contains hidden or 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
# It will print all file names (without extension) | |
# and list all files (their full paths) that reference those files inside an import statement | |
# | |
# It may and most likely will find false negatives (files that are actually used), | |
# so double-checking those files before deleting them is needed. | |
find src -name '*.tsx' \ | |
| awk -F/ '{print $NF}' \ | |
| awk -F. '{print $1}' \ | |
| xargs -I _ sh -c "echo '\nFile: _' && grep --recursive --include='*.tsx' -isw 'from .\+_\"' src | awk '{ print $1 }' | cut -d':' -f1 | uniq" \ | |
| less |
This file contains hidden or 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
<div class="wall"> | |
<div class="wall-rain-shield"></div> | |
<div id="wall-half-vertical-tiles"> | |
<div class="left-shadow"></div> | |
</div> | |
<div id="wall-masonry-vertical-tiles"> | |
<div class="left-shadow"></div> |
This file contains hidden or 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
var randomInteger = (max = 1) => Math.round(Math.random() * max) | |
var nArrayOf = (n, ofWhat) => [...Array(n).keys()].map(ofWhat) | |
var zeroPad = (value = '', n = 8) => `${value}00000000`.slice(0, n) | |
var splitBy = (string = '', by = 8) => { | |
var result = [] | |
for (var i = 0; i < string.length; i += by) { | |
result.push(string.slice(i, i + by)) |
This file contains hidden or 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 defensive() { | |
function initialState() { | |
return { | |
toEscape: 25, | |
escaping: false, | |
health: health() | |
}; | |
} | |
const Duck = { |
This file contains hidden or 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
navigator.requestMIDIAccess() | |
.then(onMIDISuccess, onMIDIFailure); | |
function onMIDIFailure() { | |
console.log('Could not access your MIDI devices.'); | |
} | |
function onMIDISuccess(midiAccess) { | |
console.log(midiAccess); |
This file contains hidden or 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
var colors = { | |
0: 'transparent', | |
1: 'white', | |
2: '#aaa' | |
} | |
var planetMap = [ | |
[ 0, 0, 1, 9, 1 ], | |
[ 0, 0, 1, 8, 1 ], | |
[ 1, 1, 1, 7, 1 ], |
NewerOlder