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

@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
@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 March 21, 2024 10:17
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}
@GAS85
GAS85 / http2_apache2_ubuntu16.04.md
Last active February 7, 2023 16:17
How to Enable HTTP/2 in Apache 2.4 on Ubuntu 16.04

Requirements

  • A self-managed VPS or dedicated server with Ubuntu 16.04 running Apache 2.4.xx.
  • For Ubuntu 18.04 please read here --> https://gist.github.com/GAS85/8dadbcb3c9a7ecbcb6705530c1252831
  • A registered domain name with working HTTPS (TLS/SSL). HTTP/2 only works alongside HTTPS because most browsers, including Firefox and Chrome, don’t support HTTP/2 in cleartext (non-TLS) mode.
@lukecav
lukecav / DNS Prefetch domains
Last active March 30, 2024 20:53
WP Rocket - Advanced Options Prefetch DNS requests examples
//maps.googleapis.com
//maps.gstatic.com
//fonts.googleapis.com
//fonts.gstatic.com
//ajax.googleapis.com
//apis.google.com
//google-analytics.com
//www.google-analytics.com
//ssl.google-analytics.com
//youtube.com