Skip to content

Instantly share code, notes, and snippets.

View amanjuman's full-sized avatar
😉
Ill

Aman Juman amanjuman

😉
Ill
View GitHub Profile
@amanjuman
amanjuman / softether.sh
Created November 30, 2018 18:01 — forked from bouroo/softether.sh
Install softether vpn server on ubuntu 16.04+
#!/usr/local/env bash
# Register digitalocean with free credit https://m.do.co/c/4879bb02d178
# Create vps with 5usd price
if [ "$(whoami)" != "root" ]; then
SUDO=sudo
fi
# Update system
${SUDO} apt-get update && ${SUDO} apt-get -y upgrade
@amanjuman
amanjuman / vpnclient
Created November 30, 2018 18:09 — forked from legokichi/vpnclient
softether vpn client for ubuntu /etc/init.d/vpnclient
#! /bin/sh
### BEGIN INIT INFO
# Provides: vpnclient
# Required-Start: $all
# Required-Stop: $network $local_fs $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start VPN Client at boot time
# chkconfig: 345 44 56
# description: Start VPN Client at boot time.
@amanjuman
amanjuman / initd-nodhcp
Created May 14, 2019 10:28 — forked from abegodong/initd-nodhcp
Softether VPN + DNSMasq
#!/bin/sh
# chkconfig: 2345 99 01
# description: SoftEther VPN Server
DAEMON=/usr/local/vpnserver/vpnserver
LOCK=/var/lock/subsys/vpnserver
SERVER_IP=[SERVER_IP]
test -x $DAEMON || exit 0
case "$1" in
start)
$DAEMON start
@amanjuman
amanjuman / git-auto-deploy.md
Last active March 27, 2020 15:30 — forked from yosukehasumi/git-auto-deploy.md
Setting Up Git-Auto-Deploy on Digital Ocean

Install software-properties-common

sudo apt-get install software-properties-common

Add Repo

sudo add-apt-repository ppa:olipo186/git-auto-deploy
@amanjuman
amanjuman / nginx.conf
Created September 1, 2020 21:46 — forked from amitsaha/nginx.conf
nginx conf + geoip2
# blog post: https://echorand.me/nginx-and-geoip2.html
worker_processes auto;
daemon off;
error_log /dev/stdout warn;
include /etc/nginx/modules/*.conf;
load_module modules/ngx_http_geoip2_module.so;
events {
}
@amanjuman
amanjuman / README.md
Created October 10, 2020 20:18 — forked from qdm12/README.md
Wireguard and iptables restrictions for multiple users

Wireguard and iptables restrictions for multiple users

If you don't know what Wireguard is, well, you should. It's fast, easy to setup and highly configurable. We will configure Wireguard for multiple users with various restrictions using iptables.

Assumptions

This should fit most setups (not mine though 😉)

@amanjuman
amanjuman / aws_single_letsencrypt.yaml
Last active October 22, 2020 12:23 — forked from tony-gutierrez/AWS_Single_LetsEncrypt.yaml
AWS Elastic Beanstalk .ebextensions Config for Single Instance Nginx Letsencrypt SSL for Nodejs
# Create two env variable "certdomain" and "email".
# Also note that this config is using the LetsEncrypt staging server, remove the flag when ready!
Resources:
sslSecurityGroupIngress:
Type: AWS::EC2::SecurityGroupIngress
Properties:
GroupId: {"Fn::GetAtt" : ["AWSEBSecurityGroup", "GroupId"]}
IpProtocol: tcp
ToPort: 443
#!/bin/bash
#1) on https://console.developers.google.com/ register project, enable Groups Migration API, and create OAuth2 credentials.
#2) set the client_id and client_secret variables below to the values provided when creating the OAuth2 credentials.
#3) make copies of the Client ID and Client Secret for the OAuth2 credentials and use them
client_id="..."
client_secret="...."
#4) get authorization code at the following link using web browser
# (make sure you sign in with an account that has access to Google Groups you are importing to).
@amanjuman
amanjuman / cloudflare-delete-all-records.sh
Created March 4, 2022 03:26 — forked from slayer/cloudflare-delete-all-records.sh
Delete all DNS records for specified zone
#!/bin/bash
TOKEN="xxxxxxxxxxxxxxxxxxx"
ZONE_ID=2222222222222222222222222
# EMAIL=me@gmail.com
# KEY=11111111111111111111111111
# Replace with
# -H "X-Auth-Email: ${EMAIL}" \
# -H "X-Auth-Key: ${KEY}" \
@amanjuman
amanjuman / wordpress-as-sub-rails-app.md
Created June 2, 2022 21:22 — forked from vuongpd95/wordpress-as-sub-rails-app.md
Setup wordpress as subdirectory (/blog) of an existing app