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
// the function that will transform the content or whatever | |
function myFunction (data, opts) { | |
// do your stuff here | |
return `${data}` | |
} | |
// the middleware that gets passed to app.use() | |
function myMiddleware (opts) { | |
// options passed to the middleware | |
// eg.: app.use(myMiddleware({opt1: "opt1", opt2: "opt2"}) |
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
<!-- | |
oooo .o88o. | |
`888 888 `" | |
.oooo.o .ooooo. 888 o888oo .oooo. .oooooooo .ooooo. ooo. .oo. .ooooo. oooo ooo | |
d88( "8 d88' `88b 888 888 `P )88b 888' `88b d88' `88b `888P"Y88b d88' `"Y8 `88. .8' | |
`"Y88b. 888ooo888 888 888 .oP"888 888 888 888ooo888 888 888 888 `88..8' | |
o. )88b 888 .o 888 888 .o. d8( 888 `88bod8P' 888 .o 888 888 888 .o8 `888' | |
8""888P' `Y8bod8P' o888o o888o Y8P `Y888""8o `8oooooo. `Y8bod8P' o888o o888o `Y8bod8P' .8' | |
d" YD .o..P' | |
"Y88888P' [email protected] `Y8P' |
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
{ | |
"\UF729" = moveToBeginningOfParagraph:; // home | |
"\UF72B" = moveToEndOfParagraph:; // end | |
"$\UF729" = moveToBeginningOfParagraphAndModifySelection:; // shift-home | |
"$\UF72B" = moveToEndOfParagraphAndModifySelection:; // shift-end | |
"^\UF729" = moveToBeginningOfDocument:; // ctrl-home | |
"^\UF72B" = moveToEndOfDocument:; // ctrl-end | |
"^$\UF729" = moveToBeginningOfDocumentAndModifySelection:; // ctrl-shift-home | |
"^$\UF72B" = moveToEndOfDocumentAndModifySelection:; // ctrl-shift-end | |
} |
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
# Requires doctl and the "public-ip-cli" npm module to be globally installed. | |
#!/bin/sh | |
FWID="YOUR_FIREWALL_ID" | |
IPV4=$("${HOME}/.nodebrew/current/bin/public-ip" --4) | |
#IPV6=$("${HOME}/.nodebrew/current/bin/public-ip" --6) | |
printf "🔥 Updating DO firewall rules\n\n" | |
OLD_RULES="$(doctl compute firewall get "${FWID}" --format InboundRules | tr ' ' '\n' | grep -E 'ports:22|ports:2022' | tr '\n' ' ' | sed '$ s/.$//')" |
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
# top-most EditorConfig file | |
root = true | |
# Unix-style newlines with a newline ending every file | |
[*] | |
end_of_line = lf | |
insert_final_newline = true | |
charset = utf-8 | |
indent_style = space | |
indent_size = 2 |
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
* {box-sizing: border-box} | |
[hidden] {display: none !important} | |
[disabled] {pointer-events:none; opacity: 0.3} | |
.horizontal {display: flex; flex-direction: row; justify-content: space-between} | |
.vertical {display: flex; flex-direction: column} | |
.center {justify-content: center; align-items: center} | |
.flex {flex: 1} | |
html { | |
--spacing-xs: 8px; | |
--spacing: 24px; |
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
.visuallyhidden { | |
border: 0; | |
clip: rect(0 0 0 0); | |
height: auto; /* new - was 1px */ | |
margin: 0; /* new - was -1px */ | |
overflow: hidden; | |
padding: 0; | |
position: absolute; | |
width: 1px; | |
white-space: nowrap; /* 1 */ |
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
#grid { | |
width: 240px; | |
background: grey; | |
} | |
.aspectRatioSizer { | |
display: grid; | |
} | |
.aspectRatioSizer > * { |
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
/* Text and background color for light mode */ | |
body { | |
color: #333; | |
} | |
/* Text and background color for dark mode */ | |
@media (prefers-color-scheme: dark) { | |
body { | |
color: #ddd; | |
background-color: #222; |
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
#!/usr/bin/env bash | |
xattr /path/to/MyApp.app | |
sudo xattr -r -d com.apple.quarantine /path/to/MyApp.app |