Skip to content

Instantly share code, notes, and snippets.

🏠
Working remotely

Indradhanush Gupta indradhanush

🏠
Working remotely
Block or report user

Report or block indradhanush

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

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

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 / debug-log.md
Created Mar 26, 2019
Error using counsel-rg
View debug-log.md

Error

Error in post-command-hook (ivy--queue-exhibit): (wrong-type-argument number-or-marker-p nil)

Debugger output

Debugger entered--Lisp error: (wrong-type-argument number-or-marker-p nil)
@indradhanush
indradhanush / minikube.txt
Last active Jan 10, 2019 — forked from F21/gist:08bfc2e3592bed1e931ec40b8d2ab6f5
Minikube RBAC Quick Start
View minikube.txt
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 Aug 31, 2018 — forked from a7madgamal/dark.md
Dark mode for Slack on MacOS
View dark.md
  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) {
     $("<style></style>").appendTo('head').html(css);
@indradhanush
indradhanush / iptables_color.txt
Created Aug 8, 2018 — forked from nega0/iptables_color.txt
colorize your `iptables` output
View iptables_color.txt
## 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 Jul 30, 2018 — forked from acolyer/jessfraz.md
Containers, operating systems and other fun things from The Morning Paper
@indradhanush
indradhanush / install-kubectl.sh
Created Apr 20, 2018 — forked from wellsie/install-kubectl.sh
Install kubectl (amd64)
View install-kubectl.sh
#!/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 / errors.txt
Created Apr 18, 2018
dep ensure errors
View errors.txt
$ dep ensure
Solving failure: No versions of github.com/habitat-sh/habitat-operator met constraints:
v0.5.1: Could not introduce github.com/habitat-sh/habitat-operator@v0.5.1, as it has a dependency on k8s.io/api with constraint kubernetes-1.9.0, which has no overlap with existing constraint kubernetes-1.9.1 from github.com/kubernetes-incubator/service-catalog@v0.1.14
v0.5.0: Could not introduce github.com/habitat-sh/habitat-operator@v0.5.0, as it has a dependency on k8s.io/api with constraint kubernetes-1.9.0, which has no overlap with existing constraint kubernetes-1.9.1 from github.com/kubernetes-incubator/service-catalog@v0.1.14
v0.4.0: Could not introduce github.com/habitat-sh/habitat-operator@v0.4.0, as its subpackage github.com/habitat-sh/habitat-operator/pkg/apis/habitat/v1beta1 is missing. (Package is required by (root).)
v0.3.0: Could not introduce github.com/habitat-sh/habitat-operator@v0.3.0 due to multiple problematic subpackages:
Subpackage github.com/habitat-sh/habitat-operator/pkg/apis/ha
@indradhanush
indradhanush / Instructions.md
Last active Apr 16, 2018
Test instructions for reproducing RBAC error
View Instructions.md

Error

Error: release habitat-service-broker failed: clusterroles.rbac.authorization.k8s.io "habitat-service-broker-habitat-service-broker" already exists
make: *** [Makefile:35: deploy-helm] Error 1

Steps to reproduce

Minkube version: 0.25.0

View fail.go
// -*- mode:go;mode:go-playground -*-
// snippet of code @ 2018-04-06 15:35:29
// === Go Playground ===
// Execute the snippet with Ctl-Return
// Remove the snippet completely with its dir and all files M-x `go-playground-rm`
package main
import (
You can’t perform that action at this time.