Skip to content

Instantly share code, notes, and snippets.

View anilyadav's full-sized avatar

Anil Yadav anilyadav

  • Banglore
View GitHub Profile

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

Tcpdump

Tcpdump is a commandline tool that is used to dump traffic on a network. This tool comes in hand when you want to analyse network captures within the command line. Basically it can do most of the wireshark job.

NOTE This guide might not be complete it just serve as a reference to me.

Additional Note & Reference

@sonhmai
sonhmai / kafka
Last active March 27, 2025 06:55
kafka basic commands
# BENCHMARK-----------------------------------------------------
#1. Rust kafka-benchmark (https://github.com/fede1024/kafka-benchmark)
# must create topic with 6 partitions first
bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 6--topic [scenario]
# replace scenario with one in file kafka-benchmark/config/base_producer.yaml
@ibspoof
ibspoof / restore_node_from_opscenter_backups.ini
Last active February 22, 2019 16:04
Restore a single nodes SSTables from OpsCenters S3 Backup Location using multi-threaded downloads
[s3]
#s3 bucket name
bucket_name = my_backups
download_threads = 6
# other s3 access is defined in the default aws cli settings file
[opscenter]
backup_job_uuid = # get this from s3 bucket
[node]
#!/bin/bash
input=$1
hole_size=$2
hole_found=false
old_line=
sample=
previous_offset=
if [ "$hole_size" = "" ]; then
hole_size="1024"
@anilyadav
anilyadav / postgres_queries_and_commands.sql
Created May 23, 2017 11:34 — forked from rgreenjr/postgres_queries_and_commands.sql
Useful PostgreSQL Queries and Commands
-- show running queries (pre 9.2)
SELECT procpid, age(query_start, clock_timestamp()), usename, current_query
FROM pg_stat_activity
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-- show running queries (9.2)
SELECT pid, age(query_start, clock_timestamp()), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
@cherti
cherti / alert.sh
Created December 9, 2016 13:47
send a dummy alert to prometheus-alertmanager
#!/bin/bash
name=$RANDOM
url='http://localhost:9093/api/v1/alerts'
echo "firing up alert $name"
# change url o
curl -XPOST $url -d "[{
\"status\": \"firing\",
# If using the RTP cluster, replace:
# <couchbase-ip>:8091 -> couchbase-ivpp.apps.vmware.openshift.wwva.ciscolabs.com
# <couchbase-ip>:8092 -> couchbase-xdcr-ivpp.apps.vmware.openshift.wwva.ciscolabs.com
# To see all of the buckets on the server.
curl -u Administrator:password -XGET http://<couchbase-ip>:8091/pools/default/buckets
# To delete an existing bucket.
curl -u Administrator:password -XDELETE http://<couchbase-ip>:8091/pools/default/buckets/<bucket-name>
@sergeyklay
sergeyklay / sed-cheatsheet.md
Last active January 1, 2025 11:56
Sed Cheatsheet

Sed Cheat Sheet

Sed command line options

sed [options] sed-command [input-file]
Option Description Example
@JonCole
JonCole / Redis-DebuggingKeyspaceMisses.md
Last active March 6, 2025 07:20
Redis Debugging Tips

Debugging Redis Keyspace Misses

Simply put, a keyspace "MISS" means some piece of data you tried to retrieve from Redis was not there. This usually means that one of the following things happened:

  1. The key expired
  2. They key was renamed
  3. The key was deleted
  4. The key was evicted due to memory pressure
  5. The entire database was flushed
  6. The key was never actually inserted