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
const { exec } = require("child_process") | |
const { Builder } = require("selenium-webdriver") | |
/** | |
* Instance a stress test | |
* @param {String<URL>} url The URL to stress test | |
* @param {Integer} numWorkers The number of workers to instance in the test | |
* @param {String} browser The browser to use for the test (requires driver in path) | |
* @param {Boolean} stopImmediately Whether to stop the test immediately after finishing | |
* @example <caption>Stress test with 100 workers using Chrome and immediate stopping</caption> |
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
git branch | grep 'feature/' | xargs git branch -d |
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
let x = [ | |
"2018", | |
"2017", | |
"2016" | |
] | |
let y = { | |
"2018": [ | |
1, | |
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
sudo apt-get install nodejs -y | |
sudo chown -R $USER /usr/local | |
sudo chown -R $USER /usr/local/lib/node_modules | |
sudo chown -R $USER ~/.npm |
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
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p |
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
# Install runtime dependencies | |
sudo apt install ffmpeg libsdl2-2.0.0 | |
# Install client build dependencies | |
sudo apt install make \ | |
gcc \ | |
pkg-config meson \ | |
libavcodec-dev \ | |
libavformat-dev \ | |
libavutil-dev \ |
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
# Install Node.js | |
sudo apt-get install nodejs -y | |
sudo apt-get install npm -y | |
# Install NativeScript Core | |
sudo npm install -g nativescript | |
# Install NativeScript dependencies | |
sudo apt-get install lib32z1 lib32ncurses5 libbz2-1.0:i386 libstdc++6:i386 -y | |
sudo apt-get install g++ -y |
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
sudo apt-get install ksshaskpass | |
git config --global core.askpass /usr/bin/ksshaskpass | |
# unset with git config --global --unset-all core.askpass |
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
require("dotenv").config() | |
const express = require("express") | |
const bodyParser = require("body-parser") | |
const { WebhookClient } = require("dialogflow-fulfillment") | |
const app = express() | |
app.use(bodyParser.urlencoded({ extended: true })) |
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
# Create an AVD with API level 25 | |
cd $ANDROID_HOME/tools/bin/ | |
./sdkmanager "system-images;android-25;google_apis;x86" | |
./sdkmanager --licenses | |
./avdmanager create avd --force --name avd25 --abi google_apis/x86 --package "system-images;android-25;google_apis;x86" | |
./avdmanager list avd | |
#### Output: | |
# Available Android Virtual Devices: | |
# Name: avd25 |