Skip to content

Instantly share code, notes, and snippets.

View navkast's full-sized avatar

Naveen Kasthuri navkast

View GitHub Profile
navkast / github-graphql-latest-branch-or-commit.graphql
Created April 26, 2020 03:15
Github GraphQL: Latest commits on a particular revision (branch or commit)
View github-graphql-latest-branch-or-commit.graphql
repository(owner: "microsoft", name: "vscode") {
object(expression: "720b72ea268ed1a0001b4be2cac35dbbfd74e079") {
... on Commit {
history(first: 5) {
nodes {
hash: oid
author {

Keybase proof

I hereby claim:

  • I am navkast on github.
  • I am navkast ( on keybase.
  • I have a public key ASBjIKKiowiLalXLMDMsEKGptSCX4s72SWFxz7KwrcMSkQo

To claim this, I am signing this object:

navkast / .gitconfig
Last active July 31, 2019 03:56
Git aliases
View .gitconfig
list-alias = "!git config -l | grep alias | cut -c 7-"
lds = log --graph --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cred\\ [%an]" --decorate --date=short
delete-merged-branches = "!f() { git branch --merged ${1-master} | grep -v " ${1-master}$" | xargs git branch -d; }; f"
puush = "!f() { git symbolic-ref --short -q HEAD | xargs git push -u origin ; }; f"
logg = log --graph --decorate --pretty=short
navkast /
Last active May 22, 2022 15:38
SetLinkedBLockingQueue - a linked blocking queue that doesn't permit dupes.
package com.navkast;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
navkast /
Created November 16, 2016 04:29
CyclicBarrierRunner: A Runnable executor that executes all submitted jobs at the exact same time. Helpful for writing concurrency tests.
package com.navkast.concurrent;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.BrokenBarrierException;
import java.util.concurrent.CountDownLatch;
import java.util.concurrent.CyclicBarrier;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicReference;
navkast /
Last active July 31, 2019 04:10
Question asked by Climb Credit (Early 2016) on parsing S-expressions
import java.util.ArrayList;
import java.util.List;
public class Solution {
public enum Error {