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 path = require("path"); | |
module.exports = { | |
extends: ["your-rules"], | |
parserOptions: { | |
// Required to improve eslint support ing VScode and neovim | |
// https://github.com/microsoft/vscode-eslint/issues/1170#issuecomment-1044201504 | |
project: path.join(__dirname, "tsconfig.eslint.json"), | |
}, | |
ignorePatterns: ["src/graphqlTypes.ts"], |
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 bash | |
# | |
# Usage | |
# | |
# skip_in_m1 cmd [ARGS] | |
# | |
# example: | |
# skip_in_m1 echo "This is not an Apple computer with M1 ARM-based CPU" | |
CMD="$@" |
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 bash | |
docker-compose run / | |
-e PGPASSWORD=database_password / | |
docker_compose_host_name / | |
psql / | |
-h docker_compose_host_name / | |
--user database_username / | |
database_name |
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 range = (n) => (new Array(n)).fill(0).map((v, k) => k) | |
const { log } = console; | |
const addUser = async (i) => new Promise((resolve) => { | |
log(`Adding user ${i}`); | |
setTimeout(() => { | |
log(`User ${i} added`); | |
resolve(); | |
}, 1000) | |
}) |
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 jasmineSlowReporter = require('jasmine-slow-reporter'); | |
jasmine.getEnv().addReporter(jasmineSlowReporter); | |
jasmineSlowReporter.threshold = process.env.TEST_SLOW_THRESHOLD || 50; | |
class CustomReporter { | |
specStarted(spec) { | |
const { | |
fullName, | |
_jasmineSlowReporter: { | |
filename, |
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 bash | |
# Steps: | |
# 1 Remove node_modules and yarn.lock from project root | |
# 2 Remove node_modules from all folders under packages | |
# 3 Install all the node_modules | |
rm -Rf node_modules yarn.lock \ | |
&& find packages/ \ | |
-name node_modules \ | |
-maxdepth 2 \ |
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 bash | |
# | |
# Install Docker on Linux Mint 19 | |
# | |
# Based on | |
# | |
# https://docs.docker.com/install/linux/docker-ce/ubuntu/ | |
# https://stackoverflow.com/questions/52545945/docker-install-on-linux-mint-19-tara |
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 bash | |
# Install TMUX from source on Linux Mint 19 | |
set -e | |
# Configure | |
VERSION=2.8 | |
ROOT=~/code-open-source | |
FILE="tmux-${VERSION}.tar.gz" |
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
/* | |
* You can also just do "node --trace-warnings app.js" | |
*/ | |
process.on('unhandledRejection', (rejection) => { | |
console.log('Unhandled promise rejection warning:'); | |
console.log(rejection); | |
}); |
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 bash | |
convert image.png ppm:- | convert ppm:- BMP3:image.bmp |
NewerOlder