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,
# The adaptor worked fine without tail and indexed the data without any erorrs
# On using tail and inserting a new row in my DB I get the following error on an infinite loop
palash25@Lenovo-G50  ~/Dev/Projects/golang/gopath/src/github.com/appbaseio/abc   analytics-switch ●  ./abc import --src_type=postgres --src_uri="postgresql://palash25:psql@250497@127.0.0.1:5432/palash25" last-ride --tail
ERRO[0004] error plucking from logical decoding pq: replication slots can only be used if max_replication_slots > 0 db=palash25
ERRO[0005] error plucking from logical decoding pq: replication slots can only be used if max_replication_slots > 0 db=palash25
ERRO[0006] error plucking from logical decoding pq: replication slots can only be used if max_replication_slots > 0 db=palash25
ERRO[0007] error plucking from logical decoding pq: replication slots can only be used if max_replication_slots > 0 db=palash25
3 total data record(s) indexed
@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`

this is my goto copy paste answer that I post everywhere and I'm going to explain you how to solve an issue using an example so I cannot assure you that this would work in case of every issue but my aim is to try to make you understand what and how to think like when solving an issue.

Note this guide assumes that you have some exposure to software devleopment and have built at least one or two of your own applications as a side project. If not then try building a few projects before starting out with OSS dev it would certainly help. Use this guide for ideas.

Get familiar with git and github if you are not already. Best way to do this is to make a little side project and push it to github. You have a lot of time for GSoC so you can make lots of side projects and experiment around with those until you are familiar with the git workflow

Pick up a software that you find interesting

5 total data record(s) indexed
6 total data record(s) indexed
7 total data record(s) indexed
ERRO[0681] no avaiable connection: no Elasticsearch node available version=2 writer=elasticsearch
ERRO[0681] no avaiable connection: no Elasticsearch node available version=2 writer=elasticsearch
8 total data record(s) indexed
ERRO[0686] elastic: Error 400 (Bad Request): Validation Failed: 1: id is missing; [type=action_request_validation_exception] version=2 writer=elasticsearch
ERRO[0686] elastic: Error 400 (Bad Request): Validation Failed: 1: id is missing; [type=action_request_validation_exception] version=2 writer=elasticsearch
9 total data record(s) indexed
ERRO[0691] elastic: Error 400 (Bad Request): Validation Failed: 1: id is missing; [type=action_request_validation_exception] version=2 writer=elasticsearch