Skip to content

Instantly share code, notes, and snippets.

View palash25's full-sized avatar

Palash Nigam (He/Him) palash25

View GitHub Profile
palash@teensoon:~/dev/go/src/github.com/percona/pmm-managed$ make env-up
docker-compose pull
WARNING: The TRAVIS_REPO_SLUG variable is not set. Defaulting to a blank string.
WARNING: The TRAVIS_PULL_REQUEST_SHA variable is not set. Defaulting to a blank string.
WARNING: The TRAVIS_COMMIT variable is not set. Defaulting to a blank string.
WARNING: The TRAVIS_PULL_REQUEST_BRANCH variable is not set. Defaulting to a blank string.
WARNING: The TRAVIS_PULL_REQUEST variable is not set. Defaulting to a blank string.
WARNING: The REVIEWDOG_GITHUB_API_TOKEN variable is not set. Defaulting to a blank string.
Pulling pmm-managed-server ... done

ES

  • Error: ElasticsearchStatusException[Elasticsearch exception [type=search_phase_execution_exception, reason=all shards failed]]

  • Solution/Reason: Fielddata was disabled

  • Caution: The solution isn't always to turn on fielddata since turning it on will increase the memory consumption by ES (because it creates an inverted index) instead append .keyword to the field name as a workaround.

  • Text fields: These are analyzed fields that can be used for full-text search (exact matches are not needed and docs can be searched using tokens)

  • Keyword fields: These are non-analyzed fields that are used for keyword search (need exact matches to return docs)

@palash25
palash25 / lein-repl-traceback
Created May 27, 2020 10:35
Discovered after installing Calva vscode plugin
#error {
:cause Wrong number of args (1) passed to: clojure.core/cons--5376
:via
[{:type clojure.lang.Compiler$CompilerException
:message Syntax error compiling at (scratch/core.clj:26:1).
:data #:clojure.error{:phase :compile-syntax-check, :line 26, :column 1, :source scratch/core.clj}
:at [clojure.lang.Compiler load Compiler.java 7648]}
{:type clojure.lang.ArityException
:message Wrong number of args (1) passed to: clojure.core/cons--5376
:at [clojure.lang.AFn throwArity AFn.java 429]}]
00:08:56.037 [info] Application elixir_ls_utils exited: :stopped
Started ElixirLS Fork v0.3.2
00:08:56.039 [info] Application erl2ex exited: :stopped
00:08:56.039 [info] Application forms exited: :stopped
[Info - 12:08:56 am] Connection to server got closed. Server will restart.
Elixir version: "1.10.2 (compiled with Erlang/OTP 21)"
Erlang version: "22"
[Warn - 12:08:56 am] ** (exit) exited in: GenServer.call(ElixirLS.LanguageServer.JsonRpc, {:packet, %{"id" => 0, "jsonrpc" => "2.0", "method" => "initialize", "params" => %{"capabilities" => %{"textDocument" => %{"codeAction" => %{"codeActionLiteralSupport" => %{"codeActionKind" => %{"valueSet" => ["", "quickfix", "refactor", "refactor.extract", "refactor.inline", "refactor.rewrite", "source", "source.organizeImports"]}}, "dynamicRegistration" => true}, "codeLens" => %{"dynamicRegistration" => true}, "colorProvider" => %{"dynamicRegistration" => true}, "completion" => %{"completionItem" => %{"commitCharactersSupport" => true, "deprecatedSupport" => true
@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 / 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@Lenovo-G50  ~/Dev/Projects/wc   master ?  \time --format "\n real %E\t user %U\t sys %S\t mem %K\t ssize %p" wc ../../small-file-*
48414 81402 556859 ../../small-file-1
48414 81402 556859 ../../small-file-2
48414 81402 556859 ../../small-file-3
145242 244206 1670577 total
real 0:00.05 user 0.05 sys 0.00 mem 0 ssize 0
palash25@Lenovo-G50  ~/Dev/Projects/wc   master ?  \time --format "\n real %E\t user %U\t sys %S\t mem %K\t ssize %p" ./target/release/wc ../../small-file-*
48414 81402 556859 ../../small-file-1
48414 81402 556859 ../../small-file-2
@palash25
palash25 / dpkg-configure-log
Created September 29, 2019 06:41
Ran ` sudo update-rc.d mysql enable` before dpkg configure
palash25@Lenovo-G50  ~  sudo dpkg --configure -a  ✔  10131  12:06:01
Setting up mysql-server-5.7 (5.7.27-0ubuntu0.16.04.1) ...
Checking if update is needed.
Checking server version.
Running queries to upgrade MySQL server.
Checking system database.
mysql.columns_priv OK
mysql.db OK
mysql.engine_cost OK
mysql.event OK
node-01
cluster.name: test
node.name: es-master-01
node.master: true
node.ingest: false
node.data: true
http.enabled: false
path.data: data/master
discovery.zen.ping.unicast.hosts: ["localhost:9301", "localhost:9302"]