Create Node Restful APIs with MySQL Database
Install Node JS and MySQL Software, create a database and import SQL file.
Go to terminal or command line.
Execute following commands to run this application.
/* ******************************************************************************************* | |
* THE UPDATED VERSION IS AVAILABLE AT | |
* https://github.com/LeCoupa/awesome-cheatsheets | |
* ******************************************************************************************* */ | |
// 0. Synopsis. | |
// http://nodejs.org/api/synopsis.html | |
#!/bin/bash | |
# script to check for complete torrents in transmission folder, then stop and move them | |
# either hard-code the MOVEDIR variable here… | |
MOVEDIR=/data/complete | |
USER=YOUR_USER_NAME | |
PASS=YOUR_PASS | |
# use transmission-remote to get torrent list from transmission-remote list | |
# use sed to delete first / last line of output, and remove leading spaces | |
# use cut to get first field from each line | |
TORRENTLIST=`transmission-remote -n $USER:$PASS --list | sed -e '1d;$d;s/^ *//' | cut --only-delimited -d ' ' --fields=1` |
# GIT aliases for ~/.gitconfig file | |
# @author Grzegorz Korba <[email protected]> | |
# Credits: Miscellaneous places on the Internet... | |
# GitFlow related sections | |
[gitflow "branch"] | |
master = master | |
develop = develop | |
[gitflow "prefix"] | |
feature = feature/ |
############################################################################### | |
# Helpful Docker commands and code snippets | |
############################################################################### | |
### CONTAINERS ### | |
docker stop $(docker ps -a -q) #stop ALL containers | |
docker rm -f $(docker ps -a -q) # remove ALL containers | |
docker rm -f $(sudo docker ps --before="container_id_here" -q) # can also filter | |
# exec into container |