realtime graph from https://star-history.com
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
## ===========================================================> The common stage | |
FROM node:16.14 AS base | |
ENV NODE_ENV=production | |
WORKDIR /app | |
COPY package*.json ./ | |
RUN npm ci --only=production | |
## Remove unnecessary files from `node_modules` directory |
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
#!/usr/bin/env -S npx zx | |
$.shell = '/usr/bin/bash' | |
$.verbose = process.env.NODE_ENV === 'development' | |
// ========================================================================== // | |
function quitWitError(errorMsg) { | |
console.error( chalk.bold.red(errorMsg) ) | |
process.exit(1) | |
} | |
function assertNotEmpty(val, errorMsg) { |
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
/* version: 03-14-2022 */ | |
.swagger-ui .info .title, .swagger-ui a.nostyle, .swagger-ui .parameter__name, .swagger-ui .parameter__type, .swagger-ui .parameter__deprecated, .swagger-ui .parameter__in, .swagger-ui table thead tr th, .swagger-ui .response-col_status, .swagger-ui table thead tr td, .swagger-ui .opblock .opblock-section-header h4, .swagger-ui label, .swagger-ui .tab li, .swagger-ui .opblock .opblock-section-header label, .swagger-ui .btn { | |
color: #CCCCCC; | |
} | |
body, .swagger-ui .info .title, .swagger-ui .scheme-container, .swagger-ui select { | |
background-color: #222; | |
color: #CCC; | |
} | |
.swagger-ui .opblock .opblock-section-header { |
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
#!/bin/bash | |
## (c) 2022 Micael Levi L. C. | |
## This script requires: | |
## - npm (https://nodejs.org) | |
## - jq (https://stedolan.github.io/jq) | |
file="${1:-./package.json}" | |
[ -r "$file" ] || { echo "The file $file is not readable" ; exit 1 ; } |
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://redis.io/topics/protocol | |
/** | |
* @param {string} str | |
* @returns {number} | |
* (c) https://stackoverflow.com/a/27377098/5290447 | |
*/ | |
function getBinarySize(str) { | |
return Buffer.byteLength(str, 'utf8'); | |
} |
This uses the
files.exclude
setting of Visual Studio Code
You just need to copy the content of exclude.jsonc
to your settings.json
file.
before | after |
---|
chmod +x *.sh
./set-aliases.sh
./install-exts.sh
mkdir -p ~/.config/prs/ && mv gh-prs--config.yml ~/.config/prs/config.yml
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
#!/bin/bash | |
URL="http://localhost:3001" | |
// https://github.com/mcollina/autocannon | |
autocannon "$URL" \ | |
--connections 100 \ | |
--timeout 20 \ | |
--pipelining 1 \ | |
--amount 2000 |
NewerOlder