Skip to content

Instantly share code, notes, and snippets.

📖
Working by learning

Stanislaw Baranski stasbar

📖
Working by learning
Block or report user

Report or block stasbar

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
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) {
adMobView.hide()
View lab3.cu
/*
Copyright 2017, Paweł Czarnul pawelczarnul@pawelczarnul.com
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
@stasbar
stasbar / install_keybase_rpi.sh
Last active Oct 4, 2019
Keybase Raspberry Pi Raspbian installator
View install_keybase_rpi.sh
echo go get keybase && \
go get github.com/keybase/client/go/keybase && \
echo go build keybase && \
go build -tags production github.com/keybase/client/go/keybase && \
sudo mv keybase /usr/bin/ && \
echo go build kbfsfuse && \
go build -tags production github.com/keybase/client/go/kbfs/kbfsfuse && \
sudo mv kbfsfuse /usr/bin/ && \
View keybase.md

Keybase proof

I hereby claim:

  • I am stasbar on github.
  • I am stasbar (https://keybase.io/stasbar) on keybase.
  • I have a public key ASDoC0PasUaZgADa88T2Ng0ghE5R8T6C5Dz3gCBqfVIlHwo

To claim this, I am signing this object:

@stasbar
stasbar / 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.security.MessageDigest
import java.security.SecureRandom
import java.util.*
import java.util.concurrent.LinkedBlockingDeque
import kotlin.system.measureTimeMillis
val sha256: MessageDigest = MessageDigest.getInstance("SHA-256")
val rand: SecureRandom = SecureRandom.getInstanceStrong()
View SoftKeyboard.java
/*
* Author: Felipe Herranz (felhr85@gmail.com)
* Contributors:Francesco Verheye (verheye.francesco@gmail.com)
* Israel Dominguez (dominguez.israel@gmail.com)
*/
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import android.os.Handler;
You can’t perform that action at this time.