- Get and Start Kong and Co
git clone git@github.com:Mashape/docker-kong.git
cd docker-kong/compose
docker-compose up
- Create Kong API Route
| # Creating and Storing password | |
| - Take the user password | |
| - Generate a salt(String of random characters) | |
| - Combine the salt with the user entered password | |
| - Hash the combined string with a suitable cryptographic algorithm. |
Reference:
sudo fdisk -l
| ./testAirAlignment --gtest_filter=PLSTests.* --gtest_also_run_disabled_tests |
| app.use(basicAuth({ | |
| users: { 'someuser': 'somepassword' }, | |
| challenge: true, | |
| realm: 'Imb4T3st4pp' | |
| })) |
| const request = require('request') | |
| var requests = [] | |
| for(let i=0;i<100;i++){ | |
| requests.push(i) | |
| } | |
| function* getAPI() { | |
| for(let i=0; i<requests.length; i++){ | |
| yield sendAPI(i) |
| import subprocess | |
| import time | |
| logFile = 'log.txt' | |
| def timeLog(description): | |
| currentTime = time.ctime() | |
| subprocess.call("echo '%s Time %s' | cat >> %s" % (description,currentTime,logFile) ,shell=True) | |
| def seperateLineLog(): |
| import subprocess | |
| with open('./a.txt') as f: | |
| lines = f.readlines() | |
| subprocess.call("db2 connect to campp4 user db2inst1 using pass123",shell=True) | |
| for i in range(len(lines)): | |
| item = lines[i] | |
| item = item[:-1] | |
| command = "db2 grant select on %s to role readonly" % item | |
| print(command) | |
| subprocess.call([command],shell=True) |
| SEVEN PRINCIPLES OF METEOR | |
| Data on the Wire. Don't send HTML over the network. Send data and let the client decide how to render it. | |
| One Language. Write both the client and the server parts of your interface in JavaScript. | |
| Database Everywhere. Use the same transparent API to access your database from the client or the server. | |
| Latency Compensation. On the client, use prefetching and model simulation to make it look like you have a zero-latency connection to the database. |
| let trigger = UNTimeIntervalNotificationTrigger(timeInterval: 3, repeats: false) | |
| let identifier = "com.onevcat.usernotification.notificationWillBeRemovedAfterDisplayed" | |
| let request = UNNotificationRequest(identifier: identifier, content: content, trigger: trigger) | |
| UNUserNotificationCenter.current().add(request) { error in | |
| if error != nil { | |
| print("Notification request added: \(identifier)") | |
| } | |
| } |