Skip to content

Instantly share code, notes, and snippets.


Zaar Hai haizaar

View GitHub Profile
mikesparr /
Last active May 25, 2020
Step-by-step setup of Google Cloud function connecting to Redis with Serverless VPC Connector
#!/usr/bin/env bash
# Reference:
# enable APIs
gcloud services enable
gcloud services enable
gcloud services enable
# set these to your specific environment
denji /
Last active Jan 16, 2021
NGINX tuning for best performance

Moved to git repository:

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

View gist:4096675

Create an index with a nested mapping:

curl -XPUT ''  -d '
   "mappings" : {
      "test" : {
         "properties" : {
            "title" : {
               "type" : "string"

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

You can’t perform that action at this time.