Skip to content

Instantly share code, notes, and snippets.

View amanjuman's full-sized avatar
😉
Ill

Aman Juman amanjuman

😉
Ill
View GitHub Profile
@diyism
diyism / tailscale exit node settings and global dns settings on pc, android termux, android shell
Last active March 5, 2024 08:29
tailscale exit node settings and global dns settings on pc, android termux or android shell
0.In my 0th vps (for example Oracle Cloud free tier VPS, ubuntu 20.04, it allow me to create 2 free vps servers):
#sudo apt install tailscale(ref: https://tailscale.com/kb/1039/install-ubuntu-2004/)
wget https://pkgs.tailscale.com/stable/tailscale_1.38.4_amd64.tgz
tar zxvf tailscale_1.38.4_amd64.tgz
sudo cp tailscale_1.38.4_amd64/tailscale* /usr/bin/
rm -rf tailscale_1.38.4_amd64*
sudo tailscale up //copy the showed url and authorize google sign-in in the web browser
ip addr show tailscale0 //for example: 100.71.153.9
1. In my 1st vps(in china, for example my linux PC in my home):
@mindfullsilence
mindfullsilence / README.md
Last active March 25, 2024 19:28
Deployment scripts for atomic deployment of laravel applications in runcloud

Runcloud Automic Deployment Script For Laravel Applications

These scripts can be used to set up automic deployments in runcloud for laravel applications

@zOrg1331
zOrg1331 / wireguard_layer2.md
Last active July 1, 2024 13:52
wireguard, wireguard layer 2, wireguard over TCP

Intro

This note describes how to connect two networks/devices/VMs over public network using Wireguard with Layer 2 support (ARP, IPv6 link-local, etc).

This can also be achieved using SSH and its "tap" tunnel, however, it does not provide the same level of latency and bandwidth as full-blown VPN such as Wireguard.

In addition, this note describes how to tunnel Wireguard over TCP connection. This may be of use if you encounter firewall in-between so, for instance, you can use TCP port 443 only.

Objective

@amanjuman
amanjuman / default
Last active December 15, 2020 17:48
Nginx Default Config Deny All Trafic
# wget -q https://gist.githubusercontent.com/amanjuman/8ad9e374cb970a352d08b950e3d3dbef/raw/ddf53d463c80dfe76f7594b3bb3a58df63cd2aad/default -O /etc/nginx/sites-available/default
server
{
server_name "";
listen 80 default_server;
listen [::]:80 default_server;
#listen 443 ssl http2 default_server;
#listen [::]:443 ssl http2 default_server;
# Generate Self-Signed-SSL
@nickjj
nickjj / cron-sendy-backup
Last active December 27, 2023 07:16
An example of creating a database backup and restore script for MySQL, MariaDB and PostgreSQL. It is focused on backing up and restoring a Sendy database (working example from https://www.youtube.com/watch?v=kbCytSYPh0E) but you can apply it for any database with slight modifications.
30 0 * * * root /usr/local/bin/sendy-backup > /dev/null 2>&1
@aveao
aveao / bird1-bird-vultr.conf
Last active June 6, 2024 10:53
BIRD 1 and 2 configs for BGP stuffs (HE Tunnelbroker, Vultr etc)
router id [our IPv4];
protocol bgp vultr
{
local as [our ASN];
source address [our IPv4 from vultr];
import all;
export filter {
if net ~ [[the IPv4 block we want to announce]] then accept;
reject;
@amitsaha
amitsaha / nginx.conf
Last active December 12, 2022 09:38
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 {
}
@vuongpd95
vuongpd95 / wordpress-as-sub-rails-app.md
Last active June 2, 2022 21:22
Setup wordpress as subdirectory (/blog) of an existing app
@slayer
slayer / cloudflare-delete-all-records.sh
Last active May 14, 2024 21:26
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}" \
#!/usr/bin/env bash
# Enter your license key below
license_key=XXXXXXXXXXXXXXXXX
curl -O -J -L 'https://sendy.co/download/?license=${license_key}'
filename=$(basename -- sendy-*.zip)
newdir="${filename%.*}"
echo ${newdir}