Skip to content

Instantly share code, notes, and snippets.

View palash25's full-sized avatar

Palash Nigam palash25

View GitHub Profile
@palash25
palash25 / alltutoroals.md
Created January 15, 2020 08:30 — forked from sdasgup3/alltutoroals.md
Few things I am inerested in!
@palash25
palash25 / benchmark+go+nginx.md
Created December 30, 2019 11:28 — forked from hgfischer/benchmark+go+nginx.md
Benchmarking Nginx with Go

Benchmarking Nginx with Go

There are a lot of ways to serve a Go HTTP application. The best choices depend on each use case. Currently nginx looks to be the standard web server for every new project even though there are other great web servers as well. However, how much is the overhead of serving a Go application behind an nginx server? Do we need some nginx features (vhosts, load balancing, cache, etc) or can you serve directly from Go? If you need nginx, what is the fastest connection mechanism? This are the kind of questions I'm intended to answer here. The purpose of this benchmark is not to tell that Go is faster or slower than nginx. That would be stupid.

So, these are the different settings we are going to compare:

  • Go HTTP standalone (as the control group)
  • Nginx proxy to Go HTTP
  • Nginx fastcgi to Go TCP FastCGI
  • Nginx fastcgi to Go Unix Socket FastCGI
@palash25
palash25 / bulk_processor_example1.go
Created June 20, 2019 14:24 — forked from olivere/bulk_processor_example1.go
Example #1 of bulk processor usage
// This is an example of using elastic's BulkProcessor with Elasticsearch.
//
// See https://github.com/olivere/elastic and
// and https://github.com/olivere/elastic/wiki/BulkProcessor
// for more details.
/*
* This example illustrates a simple process that performs bulk processing
* with Elasticsearch using the BulkProcessor in elastic.
*
@palash25
palash25 / elastic_v3_getting_started.go
Created May 26, 2019 15:47 — forked from olivere/elastic_v3_getting_started.go
Getting started with elastic.v3
package main
import (
"encoding/json"
"fmt"
"reflect"
elastic "gopkg.in/olivere/elastic.v3"
)
@palash25
palash25 / The Technical Interview Cheat Sheet.md
Created March 15, 2019 17:49 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@palash25
palash25 / rabbitmq_client.go
Last active March 3, 2019 17:03 — forked from urey-hiker/rabbitmq_client.go
rabbitmq client in golang.
package client
import (
"context"
"crypto/md5"
"crypto/tls"
"encoding/json"
"errors"
"fmt"
"net"
@palash25
palash25 / eth.doc
Created July 30, 2018 05:06 — forked from amitkumarj441/eth.doc
Ethereum Mining Setup
Check https://www.meebey.net/posts/ethereum_gpu_mining_on_linux_howto/
For Claymore setup:
https://bitcointalk.org/index.php?topic=1433925.0
http://1stminingrig.com/tutorial-ethereum-mining-rig-part-4-ethos-installation/
https://www.cryptocompare.com/mining/guides/how-to-mine-ethereum/
@palash25
palash25 / README.md
Created April 26, 2018 08:47 — forked from robertpainsi/README.md
How to reopen a pull-request after a force-push?

How to reopen a pull-request after a force-push?

Precodinitions

  • You need the rights to reopen pull requests on the repository.
  • The pull request hasn't been merged, just closed.

Instructions

  1. Write down the current commit hash of your PR-branch git log --oneline -1 <PR-BRANCH>
  2. Write down the latest commit hash on github before the PR has been closed.
  3. git push -f origin :
@palash25
palash25 / System Design.md
Created April 13, 2018 04:54 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?