The twelve-factor app Checklist Explained
| ✓ | Factors | Status | Remarks | |----|-----------------------------------------------
| ✓ | Factors | Status | Remarks | |----|-----------------------------------------------
| Team, Ever if you ahev faced with your situation w here | |
| your nodejs logs dont make sense and u r unable to figure a bug in qa or prod it is better to live debug your qa or suitable environment. Inside the docker container just send a SIGUSR1 signal to your already running node process to put it in debug mode. (edited) | |
| commands: ps | grep node | |
| take the pid of your running node process and use kill -usr1 pid to put your node process in debug mode (edited) | |
| now use node debug -p pid to use debug shell as if 9229 is not exposed you cant attach remote process to chrome devtools. now you will be in debug shell use : setbreakpoint("filename",linenumber) | |
| hit your api and it will pause at breakpoint. Use 'n' to go to next line. If you want to inspect value of variable go to RePl(type repl) and type the variable name | |
| this is already there in node docs but just dropping it here for information |
| package main | |
| import ( | |
| "bytes" | |
| "crypto/aes" | |
| "crypto/cipher" | |
| "fmt" | |
| ) | |
| func main() { |
| static getDerivedStateFromProps(nextProps, prevState) { | |
| if (_.isEmpty(prevState.RCAStatusBarMetaData)) { | |
| console.log(prevState.RCAStatusBarMetaData); | |
| const nextState = {}; | |
| nextState.RCAStatusBarMetaData = nextProps.RCAStatusBarMetaData; | |
| return Object.assign(prevState, nextState); | |
| } | |
| return null; | |
| } |
| www.whitesourcesoftware.com |
| du -sh -- * | |
| df -h .; du -sh -- * | sort -hr |
| version: "2.1" | |
| services: | |
| redis: | |
| image: "redis:latest" | |
| ports: | |
| - "6378:6379" | |
| mongodb: | |
| image: "mongo:latest" | |
| ports: | |
| - "27016:27017" |
| https://codesandbox.io/s/7w34l10wr6 | |
| https://jsbin.com/micepatajo/edit?js,output |
| scp -C -i id_rsa -r ./pic/* ubuntu@52.187.134.188:/home/ubuntu/Amma/pic |
| $ docker run -d --name some-mysql -p 3306:3306 -e MYSQL_ROOT_HOST=% -e MYSQL_ROOT_PASSWORD=password mysql/mysql-server | |
| $ docker exec -it some-mysql bash | |
| $ ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '<password>'; | |
| $ ALTER USER 'root'@'%' IDENTIFIED WITH mysql_native_password BY '<password>'; | |
| $ docker run --link some-mysql:db -p 8080:8080 adminer |