Go to File -> Settings -> Tools -> Terminal and change Shell path based on the the installed git version.
for 64bit:
"C:\Program Files\Git\bin\sh.exe" --login -ifor 32bit:
"C:\Program Files (x86)\Git\bin\sh.exe" --login -i| { | |
| "version": "0.2.0", | |
| "configurations": [ | |
| { | |
| "name": "Example", | |
| "type": "node", | |
| "request": "launch", | |
| "runtimeExecutable": "node", | |
| "runtimeArgs": ["--nolazy", "-r", "ts-node/register/transpile-only"], |
Go to File -> Settings -> Tools -> Terminal and change Shell path based on the the installed git version.
for 64bit:
"C:\Program Files\Git\bin\sh.exe" --login -ifor 32bit:
"C:\Program Files (x86)\Git\bin\sh.exe" --login -iSyntax: cat <filename> | jq -c '.[] | select( .<key> | contains("<value>"))'
Example: To get json record having _id equal 611
cat my.json | jq -c '.[] | select( ._id | contains(611))'Remember: if JSON value has no double quotes (eg. for numeric) to do not supply in filter i.e. in contains(611)
| # Backup | |
| docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
| # Restore | |
| cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |
| #!/bin/bash -e | |
| # | |
| # Improved backup script for Ubiquiti UniFi controller | |
| # original source: http://wiki.ubnt.com/UniFi#Automated_Backup | |
| # | |
| # must contain: | |
| # username=<username> | |
| # password=<password> | |
| source ~/.unifi-backup |
| # to generate your dhparam.pem file, run in the terminal | |
| openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
| //http://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid-in-javascript | |
| Math.random().toString(36).substring(2, 15) + Math.random().toString(36).substring(2, 15); |