I hereby claim:
- I am ratpik on github.
- I am pmandrek (https://keybase.io/pmandrek) on keybase.
- I have a public key ASCGIZecGSKe3KKsspNk0kS58-Ce8AP-TPBtHLswDy6IhQo
To claim this, I am signing this object:
| // Fiddle - https://jsfiddle.net/ratpik/azf5a9bv/3/ | |
| var UUIDIndex = {0:8, 1:4, 2:4, 3:4, 4:12}; | |
| function isHex(h, index) { | |
| if (UUIDIndex[index] !== _.size(h)) return false; | |
| var a = parseInt(h, 16); | |
| return !isNaN(a) && | |
| a.toString(16) === _.toLower(h) || | |
| _.join(_.times(_.size(h), _.constant(0)), '') === _.toLower(h); |
| console.log(require('http').STATUS_CODES); |
| var fs = require('fs'), // needed to read JSON file from disk | |
| sdk = require('postman-collection'), | |
| Collection = sdk.Collection, | |
| Request = sdk.Request, | |
| Item = sdk.Item, | |
| ItemGroup = sdk.ItemGroup, | |
| _ = require('lodash'), | |
| myCollection, | |
| requests = [], | |
| dfs = function (item, requests) { // fn -> Depth first search |
| pm.models.user.find({}, (err, users) => { | |
| users.forEach((user) => { | |
| console.log(`User ID: ${user.id} \n Access Token: ${user.auth.access_token} \n Email: ${user.email}`); | |
| }); | |
| }); |
| ./redis-cli -p 7777--raw keys "*" | xargs ./redis-cli -p 7777 del |
| cat *.csv| awk -F "\"*,\"*" '{print $2}'|uniq|wc -l |
| ## View all users who can connect to this database | |
| SELECT `user` FROM `mysql.user`; | |
| ## Create a new user in MySQL/AWS MySQL RDS | |
| CREATE USER 'yourusername'@'%' IDENTIFIED BY 'yourpassword'; | |
| ## List the operations that are permitted for this user | |
| SHOW GRANTS FOR 'yourusername'@'%'; | |
| -> GRANT USAGE ON *.* TO 'yourusername'@'%' (Explanation - https://stackoverflow.com/questions/2126225/why-is-a-grant-usage-created-the-first-time-i-grant-a-user-privileges) |
I hereby claim:
To claim this, I am signing this object:
| # Docker Compose file Reference (https://docs.docker.com/compose/compose-file/) | |
| version: '3.7' | |
| # Define services | |
| services: | |
| # App backend service | |
| index-digest: | |
| image: macbre/index-digest:latest | |
| # Configuration for building the docker image for the backend service |