Skip to content

Instantly share code, notes, and snippets.

View palash25's full-sized avatar

Palash Nigam (He/Him) palash25

View GitHub Profile
@palash25
palash25 / main.zig
Last active July 27, 2023 14:16
Zig code to read a file line by line
// Zig code to read and print a file line by line
const std = @import("std");
const fs = std.fs;
const io = std.io;
const debug = std.debug;
pub fn main() anyerror!void {
// use an absolute path
const path = "/home/testdata/testfile";
@palash25
palash25 / maelstrom.log
Created July 19, 2023 08:17
gcounter challenge first pass deadlock
maelstrom test -w g-counter --bin ~/go/bin/gcounter --node-count 3 --rate 100 --time-limit 20 --nemesis partition
WARNING: abs already refers to: #'clojure.core/abs in namespace: clojure.core.matrix.impl.mathsops, being replaced by: #'clojure.core.matrix.impl.mathsops/abs
Warning: protocol #'clojure.core.matrix.protocols/PMathsFunctions is overwriting function abs
WARNING: abs already refers to: #'clojure.core/abs in namespace: clojure.core.matrix.protocols, being replaced by: #'clojure.core.matrix.protocols/abs
WARNING: abs already refers to: #'clojure.core/abs in namespace: clojure.core.matrix, being replaced by: #'clojure.core.matrix/abs
WARNING: abs already refers to: #'clojure.core/abs in namespace: clojure.core.matrix.dataset, being replaced by: #'clojure.core.matrix/abs
WARNING: abs already refers to: #'clojure.core/abs in namespace: incanter.core, being replaced by: #'incanter.core/abs
INFO [2023-07-19 13:44:38,857] main - jepsen.cli Test options:
{:args [],
:log-net-send false,
@palash25
palash25 / jobs.md
Created October 27, 2021 19:22
Lesser known job opportunities

This is a list of companies that I know of and want to share with others. As undergrads or early career devs we are not even aware of the various opportunities that exist out there. You mostly here about large companies like FAANG or really old and established ones like IBM or mass recruiting consultancies like Accenture or some popular mid-large scale startups that usually end up being a ride hailing or food delivery service.

But other companies with diverse fields of work exists out there, they can be of different sizes, they could be working on OS development and systems programming instead of building the next "unicorn" app. Be it dev tools companies or companies that pay you to work on open source projects I will try to compile as many as I know.

TODO

Keybase proof

I hereby claim:

  • I am palash25 on github.
  • I am palashnigam (https://keybase.io/palashnigam) on keybase.
  • I have a public key ASBlmLCiCex81LEbUq_0iq9AKOQEXg20d-E0EXGqaHk95Ao

To claim this, I am signing this object:

add this at the top of your code

extern crate libc;

install ghc-up https://www.haskell.org/ghcup/
follow the instructions up until the last one, don't let the insatller make changes to your shell config and add the path manually to the config
`export PATH=/home/palash25/.ghcup/bin/:$PATH`
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
@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