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
/* | |
To use this script: | |
- Save this script into a directory | |
- Include a PNG image in the directory called SamplePNG_1.png | |
- From within that directory, install nano: `npm install nano` | |
- Update the constants below to match your desired values | |
- Run the script: 'node couch.js` | |
*/ | |
const NUMBER_OF_DOCS = 100; | |
const STARTING_INDEX = 2200; // Update this on subsequent runs to avoid id conflicts when running the script multiple times |
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
# a quick way to install a CHT instance. Uses bare metal couchdb | |
# see docker based install here: https://gist.github.com/mrjones-plip/7bbe7b0a44ce7876a551b9730c6fc43d | |
# | |
sudo apt update | |
sudo apt dist-upgrade | |
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash | |
export NVM_DIR="$HOME/.nvm" | |
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm | |
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion |
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
# a quick way to install a CHT instance. Uses starndard docker based couchdb | |
# see bare-metal guide here: https://gist.github.com/mrjones-plip/7760b6a1a7e9cface3714a16fe60eb93 | |
# | |
# assumes running as not root user, but with user with sudo | |
# update system, choose default and "ok" for any prompts | |
sudo apt update | |
sudo apt -y dist-upgrade | |
# install NVM, add to path, install node 12 |
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
.idea |
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 | |
set -u | |
echo "erasing results.txt" | |
cat /dev/null > results.txt | |
if [ ! -f cache/responses.3.log ]; then | |
echo "caching 3.x responses" | |
grep medicmobile.org CHT3/*log|cut -f7,8,9 -d " " |grep -v "^\-1"|cut -f3 -d " " \ |
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 node | |
// Channel ID is on the the browser URL.: https://mycompany.slack.com/messages/MYCHANNELID/ | |
// Pass it as a parameter: node ./delete-slack-messages.js CHANNEL_ID | |
// CONFIGURATION ####################################################################################################### | |
const token = 'SLACK TOKEN'; | |
// Legacy tokens are no more supported. | |
// Please create an app or use an existing Slack App |
OlderNewer