Skip to content

Instantly share code, notes, and snippets.

View indradhanush's full-sized avatar

Indradhanush Gupta indradhanush

View GitHub Profile
@indradhanush
indradhanush / speedtest.md
Created April 1, 2019 19:01 — forked from sdstrowes/foo.md
Reverse Engineering the Speedtest.net Protocol, Gökberk Yaltıraklı

Source: https://web.archive.org/web/20141216073338/https://gkbrk.com/blog/read?name=reverse_engineering_the_speedtest_net_protocol Author: Gökberk Yaltıraklı

Reverse Engineering the Speedtest.net Protocol

After finishing my command line speed tester written in Rust, I didn't have a proper blog to document this process. A few days ago I wrapped up a simple blogging script in Python so hopefully it works good enough to explain how everything works.

By now I have already figured out the whole protocol for performing a speed test but I will write all the steps that I took so you can learn how to reverse engineer a simple protocol.

The code that I wrote can be found at https://github.com/gkbrk/speedtest-rust.

@indradhanush
indradhanush / minikube.txt
Last active January 10, 2019 08:45 — forked from F21/gist:08bfc2e3592bed1e931ec40b8d2ab6f5
Minikube RBAC Quick Start
minikube start --kubernetes-version=v1.11.0 --extra-config=apiserver.authorization-mode=RBAC -v 10
kubectl create clusterrolebinding add-on-cluster-admin --clusterrole=cluster-admin --serviceaccount=kube-system:default
minikube dashboard
@indradhanush
indradhanush / dark.md
Created August 31, 2018 10:08 — forked from a7madgamal/dark.md
Dark mode for Slack on MacOS
  1. Close slack
  2. Open this file /Applications/Slack.app/Contents/Resources/app.asar.unpacked/src/static/ssb-interop.js
  3. Append this to it
document.addEventListener('DOMContentLoaded', function() {
 $.ajax({
   url: 'https://cdn.rawgit.com/laCour/slack-night-mode/master/css/raw/black.css',
   success: function(css) {
 $("").appendTo('head').html(css);
@indradhanush
indradhanush / iptables_color.txt
Created August 8, 2018 07:29 — forked from nega0/iptables_color.txt
colorize your `iptables` output
## based on the blogpost here: http://blog.sjas.de/posts/colored-iptables-output.html
iptables --line-numbers -vnL |\
sed -E 's/^Chain.*$/\x1b[4m&\x1b[0m/' |\
sed -E 's/^num.*/\x1b[33m&\x1b[0m/' |\
sed -E '/([^y] )((REJECT|DROP))/s//\1\x1b[31m\3\x1b[0m/' |\
sed -E '/([^y] )(ACCEPT)/s//\1\x1b[32m\2\x1b[0m/' |\
sed -E '/([ds]pt[s]?:)([[:digit:]]+(:[[:digit:]]+)?)/s//\1\x1b[33;1m\2\x1b[0m/' |\
sed -E '/([[:digit:]]{1,3}\.){3}[[:digit:]]{1,3}(\/([[:digit:]]){1,3}){0,1}/s//\x1b[36;1m&\x1b[0m/g' |\
sed -E '/([^n] )(LOGDROP)/s//\1\x1b[33;1m\2\x1b[0m/'|\
@indradhanush
indradhanush / jessfraz.md
Created July 30, 2018 12:27 — forked from acolyer/jessfraz.md
Containers, operating systems and other fun things from The Morning Paper
@indradhanush
indradhanush / install-kubectl.sh
Created April 20, 2018 10:14 — forked from wellsie/install-kubectl.sh
Install kubectl (amd64)
#!/bin/bash -eux
ARCH=${ARCH:-linux}
K8S_VER=${K8S_URL:-v1.1.8}
K8S_URL=https://storage.googleapis.com/kubernetes-release/release
curl -Lo /usr/local/bin/kubectl ${K8S_URL}/${K8S_VER}/bin/$ARCH/amd64/kubectl
chmod +x /usr/local/bin/kubectl
@indradhanush
indradhanush / tmux-cheatsheet.markdown
Created January 2, 2018 08:47 — forked from MohamedAlaa/tmux-cheatsheet.markdown
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname
@indradhanush
indradhanush / checkboxes.md
Created November 13, 2017 11:24 — forked from germanny/checkboxes.md
Markdown checkboxes
  • checkbox is done with the two brackets next to the P key
  • checkbox is done with the two brackets next to the P key
  • checkbox is done with the two brackets next to the P key
  • checkbox is done with the two brackets next to the P key
@indradhanush
indradhanush / codesign_gdb.md
Created June 21, 2017 20:29 — forked from hlissner/codesign_gdb.md
Codesign gdb on OSX

If you are getting this in gdb on OSX while trying to run a program:

Unable to find Mach task port for process-id 57573: (os/kern) failure (0x5).
 (please check gdb is codesigned - see taskgated(8))
  1. Open Keychain Access
  2. In menu, open Keychain Access > Certificate Assistant > Create a certificate
  3. Give it a name (e.g. gdbc)
@indradhanush
indradhanush / latency.txt
Created March 13, 2017 04:24 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers
--------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD