Skip to content

Instantly share code, notes, and snippets.

View sharjeelaziz's full-sized avatar

Sharjeel Aziz sharjeelaziz

View GitHub Profile
@sharjeelaziz
sharjeelaziz / .tmux.conf
Last active November 12, 2023 02:19
tmux commands refresher with config
set -g @plugin 'tmux-plugins/tmux-logging'
#set prefix
set -g prefix C-a
bind C-a send-prefix
unbind C-b
set -g history-limit 100000
set -g allow-rename off
@sharjeelaziz
sharjeelaziz / curl-notes.md
Last active March 17, 2023 15:33
cURL notes

Without modifying system files, pin a request to an IP address:

curl http://www.example.com --resolve www.example.com:80:127.0.0.1 --resolve www.example.com:443:127.0.0.1

Trace and restrict a request to ipv4 or ipv6:

curl -I --ipv6 --trace-ascii - https://example.com
@sharjeelaziz
sharjeelaziz / find_chia_plot.md
Last active August 29, 2023 23:47
Which Chia plot file found the proof?

How to find the Chia plot file that won the block?

  1. Search your receive address on Chia Explorer
  2. Scroll down the page to look at your farmer rewards
  3. Click on the reward for which you want to find the plot
  4. On the page that comes up, click on the Confirmed block index number
  5. Scroll down to find the proof_of_space.plot_public_key and copy the key

On your harvester/full node run the following command at the command prompt:

@sharjeelaziz
sharjeelaziz / gpg.md
Last active December 17, 2019 01:40
Workaround when git commit -S fails / gpg / yubikey

git commit with -S option fails:

When getting the following error:

shaji:netatmo-to-json/ (master✗) $ git commit -S -m "systemd support and refactoring"
error: gpg failed to sign the data
fatal: failed to write commit object
@sharjeelaziz
sharjeelaziz / etcdctl-via-kubectl.txt
Last active August 29, 2022 21:34
How to run etcdctl with kubectl
shaji:kube-sandbox/ $ kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system coredns-5c98db65d4-jx5r4 1/1 Running 5 2d
kube-system coredns-5c98db65d4-pwn5t 1/1 Running 5 2d
kube-system etcd-ohms1.aimistic.com 1/1 Running 1 24h
kube-system kube-apiserver-ohms1.aimistic.com 1/1 Running 1 24h
kube-system kube-controller-manager-ohms1.aimistic.com 1/1 Running 1 24h
kube-system kube-flannel-ds-arm-8q7v8 1/1 Running 112 2d
kube-system kube-flannel-ds-arm-9brps 1/1 Running 111 2d

Keybase proof

I hereby claim:

  • I am sharjeelaziz on github.
  • I am sharjeelaziz (https://keybase.io/sharjeelaziz) on keybase.
  • I have a public key ASAnIyX4JmbRkUHocKHPVHSPPjTj5NDDmY1PU7JSk1tT4wo

To claim this, I am signing this object:

# make the tmpfs
mkdir /mnt/tmpfs
chmod 0700 /mnt/tmpfs
mount -t tmpfs -o size=1M tmpfs /mnt/tmpfs
cd /mnt/tmpfs
# decrypt the data
gpg -o - <crypted_input_file> | \
tar -xjpf -
echo 'events {
worker_connections 1024;
}
error_log /usr/local/Cellar/nginx/1.5.8/error.log;
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
#!/usr/bin/env ruby
require 'net/http'
require 'net/https'
BASEDIR = '/etc'
LAST_IP_FILE = "#{BASEDIR}/tunnelbroker.lastip"
# for debugging.
BE_VERBOSE = false
@sharjeelaziz
sharjeelaziz / tunnelbroker-net.sh
Created June 6, 2012 19:00 — forked from pklaus/tunnelbroker-net.sh
tunnelbroker.net automatic tunnel IP update and tunnel setup (on Mac OS X)
#!/bin/bash
#### This script is published by Philipp Klaus <philipp.l.klaus@web.de>
#### on <http://blog.philippklaus.de/2011/05/ipv6-6in4-tunnel-via-hurricane-electric-tunnelbroker-net-automatic-ip-update-on-mac-os-x/>
#### It is originally by freese60 and modified by limemonkey.
#### Found on <http://www.tunnelbroker.net/forums/index.php?topic=287.0>
### Uncomment this line to debug the script:
#set -x