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
version: "3" | |
services: | |
prometheus: | |
image: prom/prometheus:v2.31.1 | |
ports: | |
- 9090:9090 | |
volumes: | |
- ./prometheus.yml:/etc/prometheus/prometheus.yml:ro | |
- ./prometheus.rules.yml:/etc/prometheus/prometheus.rules.yml:ro |
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
files: | |
"/tmp/add_default_nginx_includes.sh": | |
mode: "000755" | |
owner: root | |
group: root | |
content: | | |
#!/usr/bin/env bash | |
grep /etc/nginx/default.d /tmp/deployment/config/#etc#nginx#conf.d#00_elastic_beanstalk_proxy.conf > /dev/null 2>&1 | |
if [ $? -eq 1 ] | |
then |
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
log = new Proxy({}, {get: (x, k) => (...pass) => console.log(`%c${pass.join(' ')}`, `color: ${k}`)}) | |
// log.red('ALARM') | |
// log.salmon('hello world') | |
// log.green('OK') |
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
version: '2' | |
services: | |
drone-server: | |
image: drone/drone:latest | |
restart: unless-stopped | |
volumes: | |
- volume:/var/lib/drone/ | |
environment: | |
- GIN_MODE=release |
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
r=i=>{b=i*(d=100);[200,d,50,20,10,5,2,1].map(a=>{console.log(~~(b/a)+'x',a<d?a+'c':a/d+'€');b%=a})} | |
// Usage: | |
// r(1.56) |
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
function getURLsByHashtag(hashtag) { | |
let count = 0 | |
let urls = [] | |
return (function makeRequest(maxId = '') { | |
return fetch(`https://www.instagram.com/explore/tags/${hashtag}/?__a=1&max_id=${maxId}`) | |
.then(res => res.json()) | |
.then(res => { | |
console.log(++count) |
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
AWS_DEFAULT_REGION=__AWS_region__ | |
APPLICATION_NAME=__EB_application_name__ | |
ENVIRONMENT_NAME=__EB_environment_name__ | |
VERSION_NAME=__EB_version_name__ | |
FILENAME=$APPLICATION_NAME-$VERSION_NAME.zip | |
BUCKET=__S3_bucket_name__ | |
TIMEOUT=__timeout__ | |
# AWS_PROFILE=__AWS_local_profile__ | |
AWS_ACCESS_KEY_ID=__AWS_access_key_id__ |
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
AWS_DEFAULT_REGION=__AWS_region__ | |
APPLICATION_NAME=__EB_application_name__ | |
ENVIRONMENT_NAME=__EB_environment_name__ | |
VERSION_NAME=__EB_version_name__ | |
FILENAME=$APPLICATION_NAME-$VERSION_NAME.zip | |
BUCKET=__S3_bucket_name__ | |
# AWS_PROFILE=__AWS_local_profile__ | |
AWS_ACCESS_KEY_ID=__AWS_access_key_id__ | |
AWS_SECRET_ACCESS_KEY__AWS_secret_access_key__ |
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 | |
IP="192.168.0.1" | |
USERNAME= | |
PASSWORD="admin" | |
# Create Basic Auth Credentials | |
CREDENTIALS="$(printf "$USERNAME:$PASSWORD" | base64)" | |
# Get CSRF token |
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 | |
IP="192.168.0.1" | |
USERNAME= | |
PASSWORD="admin" | |
FAILURE_THRESHOLD=10 | |
SLEEP_TIME=5 | |
function restart { | |
CREDENTIALS="$(printf "$USERNAME:$PASSWORD" | base64)" |
NewerOlder