Skip to content

Instantly share code, notes, and snippets.

View yashodhank's full-sized avatar
🎯
Manifesting

Yashodhan yashodhank

🎯
Manifesting
View GitHub Profile
@yashodhank
yashodhank / windows.ps1
Created September 13, 2022 09:53 — forked from shurick81/windows.ps1
Laptop provisioning
# Baseline
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
Install-Module PnP.PowerShell -Force
Install-Module MSOnline -Force
Install-Module AzureAD -Force
Set-ExecutionPolicy Bypass -Force
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
# Connection and security
choco install -y forticlientvpn
@yashodhank
yashodhank / auto_plesk_trial.php
Created August 17, 2022 10:01 — forked from likecyber/auto_plesk_trial.php
Auto Plesk Trial Renewal (using Anti-Captcha to solve ReCaptcha)
<?php
/*
Make sure to enter $anticaptcha_key before upload to server.
Upload "auto_plesk_trial.php" file to "/home/centos/auto_plesk_trial.php"
Then create Schedule Task in Root account of Plesk.
Task Type: Run a PHP script
Script path: /home/centos/auto_plesk_trial.php
Use PHP version: 7.x.x / 8.x.x
Run: Cron style * * * * *
@yashodhank
yashodhank / TorPrivoxyPython.md
Created July 15, 2022 10:39 — forked from DusanMadar/TorPrivoxyPython.md
A step-by-step guide how to use Python with Tor and Privoxy

A step-by-step guide how to use Python with Tor and Privoxy

Latest revision: 2021-12-05.

Tested on Ubuntu 18.04 Docker container. The Dockerfile is a single line FROM ubuntu:18.04. Alternatively, you can simply run docker run -it ubuntu:18.04 bash.

NOTE: stopping services didn't work for me for some reason. That's why there is kill $(pidof <service name>) after each failed service <service name> stop to kill it.

References

Using keepalived for node ingress and dns relaibility

This assumes you have installed a docker swarm

Introduction

When one has a docker swarm a container running on any node in the swarm can be accesed using any IP address of any swarm memeber.

For example if you had a single web server running on port 80, on one node of a swarm you could access the web server with any of the following IP addresses:

  • server1-ip:80
  • server2-ip:80
@yashodhank
yashodhank / README.md
Created May 21, 2022 18:13 — forked from revant/README.md
ERPNext on Docker Swarm

Follow these steps:

  • Install traefik and portainer using guide available at dockerswarm.rocks
    • Use local-traefik.yaml and local-portainer.yaml for local setup. Read comments in the file.
  • Add mariadb.yaml
  • Add erpnext-v13.yaml
  • Add configure-erpnext-v13.yaml
  • Add swarm-cron.yaml
  • Add erpnext-v13-backup.yaml
  • Needs backup-and-push-sites-script.sh added as config backup-and-push-sites-script
@yashodhank
yashodhank / README.md
Created May 10, 2022 15:15 — forked from zealot128/README.md
Gitlab Autoscaling Infrastructure on Hcloud with internal caching

Order and provision a Hetzner Cloud based Gitlab-Runner Docker-machine autoscaling infrastructure

See my blog for more information.

  • Adjust settings in vars.auto.tfvars.
  • Run with terraform init && terraform apply

Content:

@yashodhank
yashodhank / cloud-init.yaml
Created May 10, 2022 15:11 — forked from vtrifonov-esfiddle/cloud-init.yaml
cloud-init config for ubuntu host with docker & docker-compose
#cloud-config
groups:
- docker
users:
- default
# the docker service account
- name: docker-service
groups: docker
package_upgrade: true
packages:
@yashodhank
yashodhank / 00-cloud-config.yml
Created May 4, 2022 03:56 — forked from janeczku/00-cloud-config.yml
Annotated RancherOS Cloud-init configuration snippets
#cloud-config
# Set the hostname for this machine (takes precedence over hostname assigned by DHCP lease).
hostname: myhost
# Authorize SSH keys for the `rancher` sudoer user
ssh_authorized_keys:
- ssh-rsa AAA...ZZZ example1@rancher
#cloud-config
bootcmd:
- sudo apt remove unattended-upgrades -y
# Prevent race condition with VM extension provisioning
- while ( fuser /var/lib/dpkg/lock >/dev/null 2>&1 ); do sleep 5; done;
- while ( fuser /var/lib/apt/lists/lock >/dev/null 2>&1 ); do sleep 5; done;
# Get apt repository signing keys
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-key C99B11DEB97541F0 # GitHub
- sudo apt-add-repository https://cli.github.com/packages
- curl https://baltocdn.com/helm/signing.asc | sudo apt-key add - # Helm