tech stack: express, nodejs, typescript https://medium.com/@paulrohan/api-for-beginners-the-greatest-bridge-of-the-web-67eb4f64c5ad
# Redis Cheatsheet | |
# All the commands you need to know | |
redis-server /path/redis.conf # start redis with the related configuration file | |
redis-cli # opens a redis prompt | |
# Strings. |
➜ browserify
zsh: command not found: browserify
➜ zaun-swagger git:(master) ✗ npm config get prefix
/usr/local/Cellar/node/8.8.1
➜ zaun-swagger git:(master) ✗ npm prefix -g
/usr/local/Cellar/node/8.8.1
➜ zaun-swagger git:(master) ✗ echo $PATH
/Users/dewioktaviani/.rvm/gems/ruby-2.4.1/bin:/Users/dewioktaviani/.rvm/gems/ruby-2.4.1@global/bin:/Users/dewioktaviani/.rvm/rubies/ruby-2.4.1/bin:/usr/local/opt/curl/bin:/usr/local/opt/openssl/bin:/Users/dewioktaviani/.pyenv/shims:/Users/dewioktaviani/.pyenv/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/TeX/texbin:/Users/dewioktaviani/.rvm/gems/ruby-2.4.1/bin:/Users/dewioktaviani/.rvm/gems/ruby-2.4.1@global/bin:/Users/dewioktaviani/.rvm/rubies/ruby-2.4.1/bin:/usr/local/opt/curl/bin:/usr/local/opt/openssl/bin:/Users/dewioktaviani/.pyenv/shims:/Users/dewioktaviani/.pyenv/bin:/usr/local/sbin/:/Users/dewioktaviani/.rvm/bin:/usr/local/sbin:/Users/dewioktaviani/.rvm/rubies$:/Users/dewioktaviani/.rvm/rubies:/Users/dewioktaviani/.local/bin:/Users/dewiok
activate rabbitmqctl command | |
You can access the user-management with rabbitmqctl and use the command: | |
`add_user {username} {password}` | |
or more preferably maybe edit an existing user, or set the permissions for the new user with: | |
`set_permissions [-p vhostpath] {user} {conf} {write} {read}` | |
For example use the following commands: (it is important to perform these three steps even when creating a new user, if you want to be able to login to the UI console and for your programs to work without facing any permission issues) |
to rename batch files with bash script in mac terminal, type this command:
for f in *.jpg
do
mv "$f" "${f/*. /}"
done
in a bash file named rename-files.sh
put the file in a folder where the files are going to be rename.
run the bash file by : sh rename-files.sh
heroku installation -> no documentation
heroku login
// insert email and passowrd info
heroku update
// heroku-cli will be updated
what's the difference between both? https://www.codeproject.com/Articles/696764/Differences-between-compiled-and-Interpreted-Langu https://kb.iu.edu/d/agsz
is php interpreted or compiled languange? https://www.quora.com/How-is-PHP-interpreted https://stackoverflow.com/questions/1514676/is-php-compiled-or-interpreted
to benchmark which one is faster between using subquery and order by in your sql.
open your package.json
file, change the test
under the script
key:
"scripts": {
"clean": "rm -rf ./lib",
"build": "tsc",
"test": "NODE_ENV=test mocha --require ts-node/register 'test/repos/bot/*.ts' --bail --exit",
the previous test
routed to test/**/*.ts
directory, then I changed it into its subdirectory test/repos/bot/*.ts
.
you can write npm test
command, and only test file under test/repo/bot
is tested.