Skip to content

Instantly share code, notes, and snippets.

Researching zero knowledge

Stanislaw Baranski stanbar

Researching zero knowledge
View GitHub Profile
stanbar /
Last active Jul 13, 2022
Deploy GH Pages via dedicated branch

Deployment via gh-pages branch

I find this the cleanes and robust approach to deploying website via gh pages. It deploys site through a separate branch called "gh_pages". That approach is a bit more complex but has some advantages:

  • It keeps sources and generated HTML in two different branches
  • It uses the default public folder
  • It keeps the histories of source branch and gh-pages branch fully separated from each other


stanbar /
Last active Jul 12, 2021
Tmux pair programming session for multiple linux users
# execute only the first time:
# sudo groupadd pair-programming
# sudo usermod -a -G pair-programming <host username>
# sudo usermod -a -G pair-programming <your peer username>
tmux -S /tmp/sharedtmux new-session -d -s pair-programming && \
sudo chgrp pair-programming /tmp/sharedtmux && \
chmod g+rwx /tmp/sharedtmux
View AdProvider.kt
sealed class AdProvider {
class BrandAdProvider(val name: String, val linkUrl: String, val imageGs: String) : AdProvider() {
val imageRef: StorageReference get() = FirebaseStorage.getInstance().getReferenceFromUrl(imageGs)
object AdMobProvider : AdProvider()
fun setupAds(where: String, adMobView: AdView, adBrandBanner: ImageView, firebaseAnalytics : FirebaseAnalytics) {
if (Utils.isProVersion) {
Copyright 2017, Paweł Czarnul
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
stanbar /
Last active Nov 17, 2022
Keybase Raspberry Pi Raspbian installator
echo go get keybase && \
go get && \
echo go build keybase && \
go build -tags production && \
sudo mv keybase /usr/bin/ && \
echo go build kbfsfuse && \
go build -tags production && \
sudo mv kbfsfuse /usr/bin/ && \

Keybase proof

I hereby claim:

  • I am stanbar on github.
  • I am stasbar ( on keybase.
  • I have a public key ASDoC0PasUaZgADa88T2Ng0ghE5R8T6C5Dz3gCBqfVIlHwo

To claim this, I am signing this object:

stanbar / blockchain-kotlin.kt
Last active Aug 24, 2018
Simple kotlin blockchain implementation demo
View blockchain-kotlin.kt
import java.math.BigDecimal
import java.math.BigInteger
import java.util.*
import java.util.concurrent.LinkedBlockingDeque
import kotlin.system.measureTimeMillis
val sha256: MessageDigest = MessageDigest.getInstance("SHA-256")
val rand: SecureRandom = SecureRandom.getInstanceStrong()
* Author: Felipe Herranz (
* Contributors:Francesco Verheye (
* Israel Dominguez (
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import android.os.Handler;