Skip to content

Instantly share code, notes, and snippets.

View ShalbafZadeh's full-sized avatar

Reza Shalbaf Zadeh ShalbafZadeh

View GitHub Profile
@irLinja
irLinja / haproxy healthcheck socks5
Last active December 7, 2023 09:37
systemd services for shadowsocks, KCPTUN, simple obfs and shadowsocks server sample configuration + haproxy + haproxy external check script and privoxy for sure
#!/bin/bash
/usr/bin/curl -sSf --socks5-hostname $(echo ${3}):$(echo ${4}) www.google.com >/dev/null
@arastu
arastu / macos-http-proxy-func.sh
Last active May 7, 2017 16:43
Shell function to set, on or off http and https proxy
# add this function to .zshrc or .bashrc
# Example:
# Set http and https proxy:
# $ macsetproxy 127.0.0.1 8118
#
# Turn http and https proxy off
# $ macoffproxy
#
# Turn http and https proxy on
# $ maconproxy
@mhnabi
mhnabi / v1.1
Created December 15, 2016 08:15
import telebot
import logging
from telebot import types
with open ("key.txt", "r") as key:
token = key.read().strip()
API_TOKEN = token
bot= telebot.TeleBot(API_TOKEN)
@brunogaspar
brunogaspar / README.md
Last active October 7, 2022 09:08
Install wkhtmltopdf on Ubuntu (14.04 64-bit) or (16.04 64-bit)

Install wkhtmltopdf on Ubuntu

This was tested on:

  • Ubuntu 14.04 x64
  • Ubuntu 16.04 x64

Installation

@lilongen
lilongen / run-ansible-with-any-host-without-inventory
Last active May 5, 2023 23:16
How to run Ansible without specifying the inventory but the host directly?
Question:
. How to run Ansible without specifying the inventory but the host directly?
. Run a playbook or command with arbitrary host not in the inventory hosts list?
. run ansible with arbitrary host/ip without inventory?
Answer:
Surprisingly, the trick is to append a ,
The host parameter preceding the , can be either a hostname or an IPv4/v6 address.
ansible all -i example.com,
@rezkam
rezkam / Itmard_git_alias.sh
Last active June 1, 2022 07:09
New git alias set of ITMARD
#itmard git alias v0.4
alias gis='git status'
alias gil='git log'
alias gull='git pull origin '
alias gica='git commit -a -m '
alias gush='git push origin '
alias granch='git branch '
alias gich='git checkout '
alias gif='git diff'
alias gifa='git fetch --all'
@dllud
dllud / bash-history-to-zsh-history.py
Last active April 13, 2021 19:54 — forked from op/bash-history-to-zsh-history.py
Import bash history (has no timestamps) to zsh history.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This is how I used it:
# $ cat ~/.bash_history | python bash-history-to-zsh-history.py >> ~/.zsh_history
import sys
import time
def main():
@grenade
grenade / 01-generate-ed25519-ssh-key.sh
Last active May 2, 2024 23:15
generate ed25519 ssh and gpg/pgp keys and set file permissions for ssh keys and config
#!/bin/bash
# generate new personal ed25519 ssh key
ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <rthijssen@gmail.com>"
# generate new host cert authority (host_ca) ed25519 ssh key
# used for signing host keys and creating host certs
ssh-keygen -t ed25519 -f manta_host_ca -C manta.network
eval "$(ssh-agent -s)"
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream