Skip to content

Instantly share code, notes, and snippets.

@Kukks
Kukks / keybase.md
Created March 23, 2022 09:03
keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

function aes_cbc_encrypt(data, rawKey) {
const iv = window.crypto.getRandomValues(new Uint8Array(16));
return aes_cbc_key(rawKey).then(function(key) {
return window.crypto.subtle.encrypt(
{
name: "AES-CBC",
//Don't re-use initialization vectors!
@Kukks
Kukks / gist:efca95519ff67f062fc86187f18b88c1
Created October 11, 2021 07:07
bitcoin-clightning.custom.yml
version: "3"
services:
clightning_bitcoin:
environment:
LIGHTNINGD_OPT: |
YOUR
EXTRA
CONFIG
HERE
{"paths":{"/api/v1/api-keys/{apikey}":{"delete":{"tags":["API Keys"],"summary":"Revoke an API Key","description":"Revoke the current API key so that it cannot be used anymore","parameters":[{"name":"apikey","in":"path","required":true,"description":"The API Key to revoke","schema":{"type":"string"}}],"responses":{"200":{"description":"The key has been deleted"},"404":{"description":"The key is not found for this user"}},"security":[{"API Key":["unrestricted"],"Basic":[]}]}},"/api/v1/api-keys/current":{"get":{"tags":["API Keys"],"summary":"Get the current API Key information","description":"View information about the current API key","responses":{"200":{"description":"Information about the current api key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiKeyData"}}}}},"security":[{"API Key":[]}]},"delete":{"tags":["API Keys"],"summary":"Revoke the current API Key","description":"Revoke the current API key so that it cannot be used anymore","responses":{"200":{"description":"The key was
@Kukks
Kukks / esnextbin.md
Created July 14, 2020 08:01
esnextbin sketch
public async Task UploadScreenshot(string clientId)
{
Screenshot ss = ((ITakesScreenshot) Driver).GetScreenshot();
var link = await UploadImageAnonymous(ss.AsBase64EncodedString, $"btcpayservertests_{DateTime.Now}");
Logs.Tester.LogInformation($"screenshot uploaded to {link}");
}
private async Task<string> UploadImageAnonymous(string base64, string name,string clientId)

Keybase proof

I hereby claim:

  • I am kukks on github.
  • I am kukks (https://keybase.io/kukks) on keybase.
  • I have a public key ASAXY_-1gn4ZEucBUj0gWy69ZJEaYtddCnZW9srMdu-HaAo

To claim this, I am signing this object:

@Kukks
Kukks / app.html
Last active May 2, 2018 07:50 — forked from 3cp/app.html
input event trigger
<template>
<input value.bind="message">
<br>
<p>Message: ${message}</p>
<button click.trigger="tryChange()">jQuery('input')[0].val('test').trigger('change')</button>
<button click.trigger="tryInput()">jQuery('input').val('test2').trigger('input')</button>
</template>
@Kukks
Kukks / resursive property.cs
Created November 3, 2016 11:09
C# helper method to dig through an object recursively via string
private readonly BindingFlags flags = BindingFlags.Static | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic;
private object GetPropertyRecursive(string property, object obj)
{
var splitted = property.Split('.');
var value = obj.GetType().GetProperty(splitted[0], flags).GetValue(obj);
if (value == null)
{
export class Reflection {
public static getPropertyName( propertyFunction: Function ): string {
return /\.([^\.;]+);?\s*\}$/.exec(propertyFunction.toString())[1];
}
public static getPropertiesOfObject( object: any ): string[] {
let result: string[] = [];
if ( typeof object === "object" ) {
for ( let i in object ) {