Skip to content

Instantly share code, notes, and snippets.

Let's chat Android, data, and visualization!

Karn Saheb Karn

Let's chat Android, data, and visualization!
View GitHub Profile
Karn / LogController.kt
Last active Jul 11, 2022
An example implementation of a process to write logs to disk asynchronously using RxJava
View LogController.kt
typealias LogElement = Triple<String, Int, String?>
object LogController {
private var flush = BehaviorSubject.create<Long>()
private var flushCompleted = BehaviorSubject.create<Long>()
private var LOG_LEVELS = arrayOf("", "", "VERBOSE",
View SampleBubbleNotification.kt
// Defines the content of the Notification
.content {
title = "New dessert menu"
text = "The Cheesecake Factory has a new dessert for you to try!"
// Bubblize the Notfication!
.bubblize {
// Create bubble intent
val target = Intent(context,
Karn / AndroidMainfest.xml
Last active May 31, 2020
Sample AndroidManifest Configuration for Notification Bubbles
View AndroidMainfest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest ...>
<!-- Add the three lines below to the activity being shown -->
Karn / BubbleActivity.kt
Last active Sep 29, 2019
A sample Activity
View BubbleActivity.kt
class BubbleActivity : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
View slack-dark.css
Copyright 2017 Bryan Keller (
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
Karn / boost.rb
Last active May 10, 2019
Boost 1.65.1 Formula
View boost.rb
class Boost < Formula
desc "Collection of portable C++ source libraries"
homepage ""
url ""
sha256 "9807a5d16566c57fd74fb522764e0b134a8bbe6b6e8967b83afefd30dcd3be81"
revision 1
head ""
bottle do
cellar :any
Karn / insights-privacy-policy.html
Last active Feb 17, 2019
Insights - Privacy Policy
View insights-privacy-policy.html
<h5>Updated: Feb 17th 2019.</h5>
<h6><a href="">Changelog</a></h6>
<p>We (the developer(s) of Insights) are serious about privacy. We want to make sure that we are transparent and open about the way we use your data to make your experience better.</p>
<p>This document is our Privacy Policy. It describes what information we collect from you and how we use it. Our Privacy Policy applies to the entire website at <a href=""></a>, the <a href="">mobile application</a>, and all other services Insights provides. It covers account information - which is information we can link to you personally (with consent). This includes data like your username or mobile device&rsquo;s unique identifier.</p>
<p>As with the nature of technology, Insights reserves the right to update this Privacy Policy to reflect changes in the law, our data use &amp; collection, the features of our services, or advan
View insights-faq.html
<h5>Updated: Feb 15th 2019.</h5>
<h6><a href="">Changelog</a></h6>
<p>Account security is very important. We want to make sure that we are transparent and open about the way we use your data to make your experience better.</p>
<p>The privacy policy is available <a href="/insights/privacy">here</a></p>
<p>As always, you can get in touch by email at <a href=""></a> with any questions you may have.</p>
<p><i>1. How does login work?</i></p>
<p>Insights uses your credentials to authenticate with Instagram the same way that the official application does. However, in some cases, we may default to an alternate method of logging you in which can sometimes result in an email notifying you of a login being sent to the email associated with the account.</p>
<p>If you recieve an email, it should indicate your current device and your location as well as date of login (you may need to convert this to your timezone)
Karn / dynamic_abi_version_code.gradle
Last active Mar 27, 2018
APK Dynamic version codes for ABI split.
View dynamic_abi_version_code.gradle
// Sourced from
// Project level build.gradle
buildscript {
// ...
// Needs to start at 1 since 0 is the universal apk.
ext.versionCodes = ['armeabi-v7a': 1, 'arm64-v8a': 2]
// ...
Karn / tumblr-base.html
Last active Jan 28, 2018
A barebones Tumblr Theme for developers.
View tumblr-base.html
<title>My personal site</title>
/* Make HTML bearable. */
body {
margin: 2rem;
font-family: sans-serif;