Skip to content

Instantly share code, notes, and snippets.

View numb95's full-sized avatar
🎯
Focusing

AmirHossein Goodarzi numb95

🎯
Focusing
View GitHub Profile
#!/bin/bash
set -e
# !!!ONLY FOR MACOS!!!
# This script helps you to bypass VPN for specific CIDRs and domain names by adding a direct route to the default gateway for them.
# It also can be used to setup a killswitch. When killswitch is enabled, Only IP traffic to the VPN server (and other bypassed CIDRs) is allowed, All other packets would be dropped.
# Killswitch is powered by MacOS internal packet filter (PF) firewall.
# How to use?
@aliva
aliva / daemon.json
Created May 12, 2019 11:59
docker daemon.json - registry mirrors which work in iran
{
"registry-mirrors": ["https://registry.docker-cn.com", "http://repo.docker.ir:5000"]
}
@arastu
arastu / anisble-playbook.sh
Last active August 18, 2018 12:04
Fix MacOS(OSX) crash complaining of operation `in progress in another thread when fork() was called` when calling ansible-playbook
alias ansible-playbook="OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES; ansible-playbook"
@chalist
chalist / iran_cities.json
Created April 7, 2018 17:37
Iran states and cities in json file.
{
"اردبیل": ["اردبیل","اصلاندوز","آبی بیگلو","بیله سوار","پارس آباد","تازه کند","تازه کندانگوت","جعفرآباد","خلخال","رضی","سرعین","عنبران","فخرآباد","کلور","کوراییم","گرمی","گیوی","لاهرود","مرادلو","مشگین شهر","نمین","نیر","هشتجین","هیر"],
"اصفهان": ["ابریشم", "ابوزیدآباد", "اردستان", "اژیه", "اصفهان", "افوس", "انارک", "ایمانشهر", "آران وبیدگل", "بادرود", "باغ بهادران", "بافران", "برزک", "برف انبار", "بوئین ومیاندشت", "بهاران شهر", "بهارستان", "پیربکران", "تودشک", "تیران", "جندق", "جوزدان", "جوشقان وکامو", "چادگان", "چرمهین", "چمگردان", "حبیب آباد", "حسن آباد", "حنا", "خالدآباد", "خمینی شهر", "خوانسار", "خور", "خوراسگان", "خورزوق", "داران", "دامنه", "درچه پیاز", "دستگرد", "دولت آباد", "دهاقان", "دهق", "دیزیچه", "رزوه", "رضوانشهر", "زاینده رود", "زرین شهر", "زواره", "زیباشهر", "سده لنجان", "سفیدشهر", "سگزی", "سمیرم", "شاپورآباد", "شاهین شهر", "شهرضا", "طالخونچه", "عسگران", "علویچه", "فرخی", "فریدونشهر", "فلاورجان", "فولادشهر", "قمصر", "قهجاورستان", "قهدریجان", "کاشان", "کرکوند", "کلیشادوسودرجان", "کمشچه", "کمه"
# using:
# for set proxy:
# $ setproxy 127.0.0.1 8118
# for unset:
# $ unsetproxy
function setproxy() {
export {http,https,ftp,HTTP,HTTPS}_proxy=http://$1:$2
export no_proxy="localhost,127.0.0.1,master.cafecluster"
echo "Proxy variable(http,https,ftp) set to $1:$2"
@potter0815
potter0815 / cloneall.sh
Last active January 30, 2024 13:07
clone all private repos of an organization
#!/bin/bash
#requires jq -> http://stedolan.github.io/jq/
#optional change working_dir
working_dir=${1-$(pwd)}
cd $working_dir
user="github_username"
token="application token"
organization="Organization_Name"