Skip to content

Instantly share code, notes, and snippets.

Avatar
🐢
Moving Slowly

Wai Yan Win Htain waiyanwh

🐢
Moving Slowly
View GitHub Profile
View .gitlab-ci.yml
image: docker:git
services:
- docker:19.03.0-dind
variables:
DOCKER_HOST: tcp://docker:2375/
DOCKER_DRIVER: overlay2
DOCKER_TLS_CERTDIR: ""
View confluence-script.sh
#!/bin/bash
user=
token=
newdev=25165825
newqa=25100295
dev=25034777
qa=25198603
if [[ $# -ne 1 ]]; then
@waiyanwh
waiyanwh / config.toml
Last active November 18, 2021 14:14
VMware vSphere Gitlab Runner Autoscale Config (docker-machine)
View config.toml
concurrent = 4
check_interval = 0
[session_server]
session_timeout = 1800
[[runners]]
name = "autoscale-runner"
url = "https://gitlab.com/"
token = "<YOUR TOKEN HERE>"
@waiyanwh
waiyanwh / config.toml
Last active April 27, 2022 13:28
AWS gitlab runner autoscaling
View config.toml
concurrent = 4
check_interval = 0
[session_server]
session_timeout = 1800
[[runners]]
name = "Autoscale runner"
limit = 8
url = "https//gitlab.com/"
@waiyanwh
waiyanwh / Instructuin
Last active June 22, 2022 05:12
Fix corrupted sudoers file in ubuntu
View Instructuin
# 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
View sns-delivery-status-logging.tf
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 = [
View binance-p2p-fetch.js
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,