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
console.log(1); | |
(async () => { | |
const promiseF = new Promise((resolve, reject) => { | |
console.log(2) | |
setTimeout(()=>{ | |
try { | |
console.log(3) | |
resolve() | |
console.log(4) | |
} catch (error) { |
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
// MY_KEY=test\ntest2\ntest3 | |
JSON.parse(`"${process.env.MY_KEY}"`) | |
/* | |
test | |
test2 | |
test3 | |
*/ |
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
# Taps | |
tap 'homebrew/cask-fonts' | |
tap 'homebrew/cask-versions' | |
tap 'heroku/brew' | |
# Install CLI Tools | |
## Shell Utilities | |
brew 'coreutils' | |
brew 'findutils' | |
brew 'autojump' |
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
git filter-branch --env-filter ' | |
OLD_EMAIL="your-old-email@example.com" | |
CORRECT_NAME="Your Correct Name" | |
CORRECT_EMAIL="your-correct-email@example.com" | |
if [ "$GIT_COMMITTER_EMAIL" = "$OLD_EMAIL" ] | |
then | |
export GIT_COMMITTER_NAME="$CORRECT_NAME" | |
export GIT_COMMITTER_EMAIL="$CORRECT_EMAIL" | |
fi | |
if [ "$GIT_AUTHOR_EMAIL" = "$OLD_EMAIL" ] |
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
# common base image for development and production | |
FROM node:10.11.0-alpine AS base | |
WORKDIR /app | |
# dev image contains everything needed for testing, development and building | |
FROM base AS development | |
COPY package.json yarn.lock ./ | |
# first set aside prod dependencies so we can copy in to the prod image |
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
{"lastUpload":"2021-04-27T14:20:49.226Z","extensionVersion":"v3.4.3"} |
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 InArray(Needle, Haystack) | |
Dim i, x | |
InArray = False | |
For i = 0 To Ubound(Haystack) | |
If IsArray(Needle) = True Then | |
For x = 0 To Ubound(Needle) | |
If Trim(Haystack(i)) = Trim(Needle(x)) Then | |
InArray = True |
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
aws s3api list-objects --bucket BUCKETNAME --output json --query "[sum(Contents[].Size), length(Contents[])]" |
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
/* | |
filepreview : A file preview generator for node.js | |
*/ | |
var child_process = require('child_process'); | |
var crypto = require('crypto'); | |
var async = require('async'); | |
var path = require('path'); |
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
fs.appendFile('message.txt', 'data to append', function (err) { | |
if (err) throw err; | |
console.log('Saved!'); | |
}); |