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
#!/usr/bin/python3 | |
import boto3 | |
import csv | |
from prettytable import PrettyTable | |
# Input all regions that you used in your aws accounts | |
regions = ['us-east-1', 'ap-southeast-1', 'ap-northeast-1'] | |
all_enis = [] | |
for region in regions: | |
ec2 = boto3.client('ec2', region_name=region) |
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 https = require("https"); | |
function fetchP2PData(page = 1, fiat = "MMK", tradeType = "BUY", asset = "USDT", payTypes = []) { | |
return new Promise((resolve, reject) => { | |
const baseObj = { | |
page, | |
rows: 3, | |
publisherType: null, | |
asset, | |
tradeType, |
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
resource "aws_cloudwatch_log_group" "example" { | |
name = "example-log-group" | |
} | |
resource "aws_iam_policy" "example" { | |
name = "example-policy" | |
policy = jsonencode({ | |
Version = "2012-10-17", | |
Statement = [ |
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
# If you can access the machine physically , open terminal and run the following command | |
pkexec visudo | |
# If you have only ssh access to the machine, | |
# run the following command, it will freeze your terminal but will fix the issue | |
# you can get the sudoers file in this gist. | |
pkttyagent -p $(echo $$) | pkexec cp ~/sudoers /etc/sudoers |
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 | |
user= | |
token= | |
newdev=25165825 | |
newqa=25100295 | |
dev=25034777 | |
qa=25198603 | |
if [[ $# -ne 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
concurrent = 4 | |
check_interval = 0 | |
[session_server] | |
session_timeout = 1800 | |
[[runners]] | |
name = "autoscale-runner" | |
url = "https://gitlab.com/" | |
token = "<YOUR TOKEN HERE>" |
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
image: docker:git | |
services: | |
- docker:19.03.0-dind | |
variables: | |
DOCKER_HOST: tcp://docker:2375/ | |
DOCKER_DRIVER: overlay2 | |
DOCKER_TLS_CERTDIR: "" |
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
concurrent = 4 | |
check_interval = 0 | |
[session_server] | |
session_timeout = 1800 | |
[[runners]] | |
name = "Autoscale runner" | |
limit = 8 | |
url = "https//gitlab.com/" |