Skip to content

Instantly share code, notes, and snippets.

View rajatjindal's full-sized avatar

Rajat Jindal rajatjindal

View GitHub Profile
hey -c 500 -z 10s http://localhost:8083/hello

Summary:
  Total:	10.6287 secs
  Slowest:	2.0148 secs
  Fastest:	0.0039 secs
  Average:	0.6924 secs
  Requests/sec:	693.5025
@rajatjindal
rajatjindal / spin-side-car.yaml
Created March 15, 2024 13:32
spin-side-car.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: spin-test-multi-container
spec:
replicas: 1
selector:
matchLabels:
app: spin-test
template:
@rajatjindal
rajatjindal / gist:bba05cd9cff3963dd2358be15dba0f25
Last active March 5, 2024 08:06
build containerd static hack

Build containerd binary to run inside k3d node

go build -o containerd -tags 'static_build libsqlite3 ctrd apparmor seccomp netgo osusergo providerless urfave_cli_no_docs selinux' -gcflags=all= -ldflags '-w -s -extldflags '\''-static -lm -ldl -lz -lpthread'\'''  cmd/containerd/main.go

Copy containerd into k3d nodes

for c in `docker ps | grep containerd-wasm-shims | awk '{print $1}'`; do docker cp containerd $c:/bin/containerd; done
### Keybase proof
I hereby claim:
* I am rajatjindal on github.
* I am rajatjindal (https://keybase.io/rajatjindal) on keybase.
* I have a public key ASCTJkatFoxPpEeRmBijuCswdiJyzIHRMKOTs3uNhtfrHgo
To claim this, I am signing this object:
@rajatjindal
rajatjindal / gitsvndiff.pl
Created August 26, 2022 06:44
generate crucible compatible diff from git
#!/usr/bin/perl
use strict;
use warnings;
my $gitrev = $ARGV[0];
if (!$gitrev) {
die "usage: gitdiff <a51335c5c5e40fad2b788cdea1b2f7bba6c229eb>\n";
}
my $svnrev = `git show $gitrev | grep git-svn-id | awk -F'\@' '{print \$2}' | awk '{print \$1}'`;
@rajatjindal
rajatjindal / social-media-embedding.hbs
Last active April 4, 2022 07:40
embedding social media
{{> content_top }}
<div class="col-md-8">
<h2 class="learn-more-card-group">Embedding tweet</h2>
<code>
tweet "fermyontech" "1504846517571489794"
</code>
{{{ tweet "fermyontech" "1504846517571489794" }}}
<h2 class="learn-more-card-group">Embedding gist</h2>
@rajatjindal
rajatjindal / Headers
Created January 30, 2019 03:53
installation created webhook event
Request method: POST
content-type: application/json
Expect:
User-Agent: GitHub-Hookshot/640910a
X-GitHub-Delivery: 55ae1c20-23d9-11e9-9ba5-67decefe0c10
X-GitHub-Event: integration_installation
@rajatjindal
rajatjindal / make build
Created April 23, 2018 16:50
make build error
k8s.io/helm/cmd/...
# k8s.io/helm/pkg/storage/driver
pkg/storage/driver/cfgmaps.go:65:53: cannot use "k8s.io/helm/vendor/k8s.io/apimachinery/pkg/apis/meta/v1".GetOptions literal (type "k8s.io/helm/vendor/k8s.io/apimachinery/pkg/apis/meta/v1".GetOptions) as type "k8s.io/helm/vendor/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1".GetOptions in argument to cfgmaps.impl.Get
pkg/storage/driver/cfgmaps.go:91:32: cannot use opts (type "k8s.io/helm/vendor/k8s.io/apimachinery/pkg/apis/meta/v1".ListOptions) as type "k8s.io/helm/vendor/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1".ListOptions in argument to cfgmaps.impl.List
pkg/storage/driver/cfgmaps.go:127:32: cannot use opts (type "k8s.io/helm/vendor/k8s.io/apimachinery/pkg/apis/meta/v1".ListOptions) as type "k8s.io/helm/vendor/k8s.io/kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1".ListOptions in argument to cfgmaps.impl.List
pkg/storage/driver/cfgmaps.go:212:58: cannot use "k8s.io/helm/vendor/k8s.io/apimachinery/pkg/apis/meta/
apiVersion: v1
kind: ConfigMap
metadata:
name: kube-dns
namespace: kube-system
data:
upstreamNameservers: |
["upstream.dns.server1", "upstream.dns.server2"]
package mergo
import (
"encoding/json"
"reflect"
"testing"
)
var (
authinfo = `{