Skip to content

Instantly share code, notes, and snippets.

@indyaah
indyaah / ghget
Last active October 27, 2018 18:21
ghget () {
USER=$(echo $@ | tr "/" " " | awk '{print $1}')
REPO=$(echo $@ | tr "/" " " | awk '{print $2}')
mcd "$HOME/src/github.com/$USER" && hub clone $@ && cd $REPO
}
mcd () {
mkdir -p -p "$@" && cd "$@"
}
@indyaah
indyaah / gist:38fd199e1bf90d8e93e319e6193cef47
Created October 25, 2018 20:07
Jenkins Create Secret Text Crendential programmatically
import jenkins.model.*
import hudson.util.Secret
import org.jenkinsci.plugins.plaincredentials.impl.StringCredentialsImpl
import org.jenkinsci.plugins.plaincredentials.*
import com.cloudbees.plugins.credentials.*
import com.cloudbees.plugins.credentials.common.*
import com.cloudbees.plugins.credentials.domains.*
import com.cloudbees.plugins.credentials.impl.*
import com.cloudbees.jenkins.plugins.sshcredentials.impl.*

Keybase proof

I hereby claim:

  • I am indyaah on github.
  • I am anujpatel (https://keybase.io/anujpatel) on keybase.
  • I have a public key ASC3q7Lt_7Wdwn11sGGEC0-7uuAxrd9XESucRjUvjMPDGAo

To claim this, I am signing this object:

@indyaah
indyaah / a.md
Last active May 11, 2020 10:38

Bloom filter library

Changelog | Setup | Docs | Maven Repo

Version 1 is out with a complete rewrite of almost all functionalities and many new ones.

This is a set of Bloom filters we implemented as we found all existing open-source implementations to be lacking in various aspects. This library takes some inspiration from the simple Bloom filter implementation of Magnus Skjegstad and the Ruby Bloom filters by Ilya Grigorik.

The Bloom filter is a probabilistic set data structure which is very small. This is achieved by allowing false positives with some probability p. It has an add and contains operation which both are very fast (time complexity O(1)). The Counting Bloom filter is an extension of the Bloom filter with a remove operation at the cost of incurring an addition