Skip to content

Instantly share code, notes, and snippets.

View kirillzh's full-sized avatar
☀️

Kirill Zhukov kirillzh

☀️
View GitHub Profile
@remyers
remyers / async-payment-donation.md
Last active December 18, 2023 02:35
async-payments user story: donation QR code

The async-payment user story I'm interested in exploring is a mobile user (not always connected) who wants to receive donations (no PoP) via a static invoice from another mobile user.

My understanding of how this could work:

  1. The static invoice should contain a blinded route to the payment receiver via their LSP and an ephemeral public key that the payment sender will use to encrypt the last hop of a payment onion containing a keysend TLV. The LSP of the payment receiver must support store-and-forward of onion messages.

  2. A payment sender builds a payment onion where the first hop is their LSP that supports trampoline payments, onion messages and async-payments. The first hop of the onion includes a TLV to indicate the payment should be held until triggered (with a async-payment nonce) and gives the blinded route to the payment receiver. The last hop of the onion is encrypted to the payment receiver's ephemeral public key and includes:

  • the keysend TLV payment secret
  • the amount being sent
I was drawn to programming, science, technology and science fiction
ever since I was a little kid. I can't say it's because I wanted to
make the world a better place. Not really. I was simply drawn to it
because I was drawn to it. Writing programs was fun. Figuring out how
nature works was fascinating. Science fiction felt like a grand
adventure.
Then I started a software company and poured every ounce of energy
into it. It failed. That hurt, but that part is ok. I made a lot of
mistakes and learned from them. This experience made me much, much
@zach-klippenstein
zach-klippenstein / DrawLayerDemo.kt
Last active October 21, 2021 10:59
Interactive demo of the drawLayer composable function. (screencap in comments)
import androidx.animation.PhysicsBuilder
import androidx.animation.Spring.DampingRatioHighBouncy
import androidx.animation.Spring.StiffnessLow
import androidx.compose.Composable
import androidx.compose.Model
import androidx.compose.remember
import androidx.ui.animation.animate
import androidx.ui.core.DrawClipToBounds
import androidx.ui.core.Text
import androidx.ui.core.drawLayer
@jrodbx
jrodbx / kt2java_diff_hack.sh
Created March 8, 2019 03:58
Hack to enable better Java to Kotlin diffs
#!/usr/bin/env bash
# Find all added *.kt files from last commit and mv to *.java
for f in $(git diff --name-status --diff-filter='A' HEAD~ "*.kt" | cut -f 2);
do mv -- "$f" "${f%.kt}.java";
done
# Commit the kt to java changes
git add .
git commit -m"kt to java"
@hurricane-voronin
hurricane-voronin / README.md
Last active May 2, 2024 08:20
Naming Classes Without a 'Manager'
@itod
itod / split_keyboards.md
Last active April 28, 2024 19:44
Every "split" mechanical keyboard currently being sold that I know of
@Arinerron
Arinerron / permissions.txt
Last active March 27, 2024 04:59
A list of all Android permissions...
android.permission.ACCESS_ALL_DOWNLOADS
android.permission.ACCESS_BLUETOOTH_SHARE
android.permission.ACCESS_CACHE_FILESYSTEM
android.permission.ACCESS_CHECKIN_PROPERTIES
android.permission.ACCESS_CONTENT_PROVIDERS_EXTERNALLY
android.permission.ACCESS_DOWNLOAD_MANAGER
android.permission.ACCESS_DOWNLOAD_MANAGER_ADVANCED
android.permission.ACCESS_DRM_CERTIFICATES
android.permission.ACCESS_EPHEMERAL_APPS
android.permission.ACCESS_FM_RADIO
-Xms1G
-Xmx4G
-XX:MaxPermSize=2G
-XX:ReservedCodeCacheSize=240m
-XX:+UseCompressedOops
-XX:MetaspaceSize=512m
@jdmaturen
jdmaturen / company-ownership.md
Last active July 29, 2023 22:39
Who pays when startup employees keep their equity?

Who pays when startup employees keep their equity?

JD Maturen, 2016/07/05, San Francisco, CA

As has been much discussed, stock options as used today are not a practical or reliable way of compensating employees of fast growing startups. With an often high strike price, a large tax burden on execution due to AMT, and a 90 day execution window after leaving the company many share options are left unexecuted.

There have been a variety of proposed modifications to how equity is distributed to address these issues for individual employees. However, there hasn't been much discussion of how these modifications will change overall ownership dynamics of startups. In this post we'll dive into the situation as it stands today where there is very near 100% equity loss when employees leave companies pre-exit and then we'll look at what would happen if there were instead a 0% loss rate.

What we'll see is that employees gain nearly 3-fold, while both founders and investors – particularly early investors – get dilute

@wispborne
wispborne / KotlinComparisonClass.java
Last active August 17, 2020 19:42
Comparison of Java to Kotlin for various simple methods.
/** Example of a {@link Class} declaration */
public final class MyClass {
private boolean someBool;
public MyClass() {
}
public MyClass(boolean someBool) {
this.someBool = someBool;
}