Help Ukraine by attacking Russian web sites. Good load testing training.
Tools:
Help Ukraine by attacking Russian web sites. Good load testing training.
Tools:
import axios, { AxiosResponse } from 'axios'; | |
import { config } from '../config'; | |
import { Sentry } from '../libs/sentry'; | |
/** | |
* @description Ip Stack API response | |
*/ | |
interface IIpStackResponse { | |
latitude: number; | |
longitude: number; |
export class RequestError extends Error { | |
constructor(message, meta = {}) { | |
super(); | |
this.message = message; | |
this.meta = meta; | |
} | |
} |
const Sentry = require('@sentry/node'); | |
Sentry.init({ dsn: process.env.SENTRY_DSN, environment: 'staging' }); | |
Sentry.captureException(new Error('Test from local')); |
// Add any other logic here as needed. | |
import { CacheableResponsePlugin } from 'workbox-cacheable-response/CacheableResponsePlugin'; | |
import { CacheFirst } from 'workbox-strategies/CacheFirst'; | |
import { createHandlerForURL } from 'workbox-precaching/createHandlerForURL'; | |
import { ExpirationPlugin } from 'workbox-expiration/ExpirationPlugin'; | |
import { NavigationRoute } from 'workbox-routing/NavigationRoute'; | |
import { precacheAndRoute } from 'workbox-precaching/precacheAndRoute'; | |
import { registerRoute } from 'workbox-routing/registerRoute'; |
/** | |
* @description Runs getUser() in sequential. | |
* @return {Promise<void>} | |
*/ | |
async function example() { | |
for (let i = 0; i < 10; i++) { | |
await getUser(); | |
} | |
} |
With git you can add a submodule to a repository. A submodule is another repository inside a repository.
git submodule add [email protected]:my_account/my_submodule.git path_to_my_submodule
UPDATE (March 2020, thanks @ic): I don't know the exact AMI version but yum install docker
now works on the latest Amazon Linux 2. The instructions below may still be relevant depending on the vintage AMI you are using.
Amazon changed the install in Linux 2. One no-longer using 'yum' See: https://aws.amazon.com/amazon-linux-2/release-notes/
sudo amazon-linux-extras install docker
sudo service docker start
const AWS = require('aws-sdk'); | |
const fs = require('fs'); | |
AWS.config.update({ accessKeyId: 'ACCESSKEYID', secretAccessKey: 'SECRETACCESSKEY', region: 'eu-west-3'}); | |
const fileStream = fs.createReadStream('/path/to/your/image.png'); | |
fileStream.on('error', function (err) { | |
if (err) { throw err; } | |
}); |