This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fetch = require('node-fetch'); | |
const twilio = require('twilio'); | |
// Twilio credentials | |
const accountSid = 'your_twilio_account_sid'; | |
const authToken = 'your_twilio_auth_token'; | |
const client = new twilio(accountSid, authToken); | |
// IDM.in API credentials | |
const IDM_API_KEY = 'your_idm_api_key'; // https://app.idm.in/settings/apikeys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Do not change version. This is the version of aws buildspec, not the version of your buldspec file. | |
version: 0.2 | |
phases: | |
install: | |
runtime-versions: | |
nodejs: '12' | |
pre_build: | |
commands: | |
- echo Installing source NPM dependencies... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const puppeteer = require("puppeteer"); | |
(async () => { | |
const browser = await puppeteer.launch({ | |
headless: true, | |
timeout: 30000, | |
ignoreHTTPSErrors: true, | |
args: ["--no-sandbox", "--disable-setuid-sandbox"], | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on https://github.com/PrakashTrove/AWS-CodeBuild-NetCore/blob/master/buildspec.yml | |
# AWS CodeBuild spec to build an Elastic Beanstalk artifact for AWS CodePipeline to deploy | |
version: 0.2 | |
phases: | |
install: | |
runtime-versions: | |
dotnet: 5.0 | |
#dotnet: latest - Latest resolve to 3.1, check this issue https://github.com/aws/aws-codebuild-docker-images/issues/414 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
yum -y install gcc make # install GCC compiler | |
cd /home/ec2-user | |
wget http://download.redis.io/redis-stable.tar.gz | |
tar xvzf redis-stable.tar.gz | |
rm -f redis-stable.tar.gz | |
cd redis-stable | |
make distclean | |
make | |
# Run tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
packages: | |
yum: | |
gcc-c++: [] | |
make: [] | |
sources: | |
/home/ec2-user: http://download.redis.io/releases/redis-5.0.8.tar.gz | |
commands: | |
redis_build: | |
command: make | |
cwd: /home/ec2-user/redis-5.0.8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo yum -y install gcc make # install GCC compiler | |
cd /home/ec2-user | |
sudo wget http://download.redis.io/redis-stable.tar.gz | |
sudo tar xvzf redis-stable.tar.gz | |
sudo rm -f redis-stable.tar.gz | |
cd redis-stable | |
sudo make distclean | |
sudo make |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var clicked = 0; | |
var timer = setInterval(() => { | |
var element = document.querySelector('#submit'); | |
if (!element || clicked > 3) | |
{ | |
clearInterval(timer); | |
} | |
else{ | |
element.click(); | |
clicked++; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var totalHeight = 0; | |
var distance = 100; | |
var timer = setInterval(() => { | |
var scrollHeight = document.body.scrollHeight; | |
window.scrollBy(0, distance); | |
totalHeight += distance; | |
if (totalHeight >= scrollHeight) { | |
clearInterval(timer); | |
} |