git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
git clone [email protected]:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| #!/bin/bash | |
| mkdir -p ~/.ssh | |
| # generate new personal ed25519 ssh keys | |
| ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_ed25519 -C "rob thijssen <[email protected]>" | |
| ssh-keygen -o -a 100 -t ed25519 -f ~/.ssh/id_robtn -C "rob thijssen <[email protected]>" | |
| # generate new host cert authority (host_ca) ed25519 ssh key | |
| # used for signing host keys and creating host certs |
| #!/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(): |
| #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' |
| 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, |
| 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) | |
| # 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 |
| #!/bin/bash | |
| /usr/bin/curl -sSf --socks5-hostname $(echo ${3}):$(echo ${4}) www.google.com >/dev/null |