Skip to content

Instantly share code, notes, and snippets.

View king-11's full-sized avatar
🎯
Targeting

Lakshya Singh king-11

🎯
Targeting
View GitHub Profile
@king-11
king-11 / plan.md
Last active May 30, 2024 15:29
VLS Q&A Testing
flowchart LR
	n1((Node 1))
	n2((Node 2))
	n3((Node 3))
	n1 --> |channel 1|n2
	n2 --> |channel 2|n3

Each channel should have 100,000sats put in by node 1 for channel 1 and node 2 for channel 2

Boat Racing

You manage to sign up as a competitor in the boat races just in time. The organizer explains that it's not really a traditional race - instead, you will get a fixed amount of time during which your boat has to travel as far as it can, and you win if your boat goes the farthest.

As part of signing up, you get a sheet of paper (your puzzle input) that lists the time allowed for each race and also the best distance ever recorded in that race. To guarantee you win the grand prize, you need to make sure you go farther in each race than the current record holder.

The organizer brings you over to the area where the boat races are held. The boats are much smaller than you expected - they're actually toy boats, each with a big button on top. Holding down the button charges the boat, and releasing the button allows the boat to move. Boats move faster if their button was held longer, but time spent holding the button counts against the total race time. You can only hold the button at the start of the ra

@king-11
king-11 / docker-run-vlsd.md
Last active December 28, 2023 15:49
Docker blog for vlsd service setup
title description
docker run vlsd
setup your vlsd service with docker in few simple steps on any system capable of running containerized solution

Great, so you have decided to take a step towards added security by integrating vls into your lightning node system. A fully functional vls system consists of atleast the below mentioned services:

  • bitcoind
  • lightnind
  • txood
  • lightning-storage-server
@king-11
king-11 / renew-gpgkey.md
Created August 23, 2021 08:07 — forked from krisleech/renew-gpgkey.md
Renew Expired GPG key

Renew GPG key

Given that your key has expired.

$ gpg --list-keys
$ gpg --edit-key KEYID

Use the expire command to set a new expire date:

@king-11
king-11 / socket_library_api.md
Last active July 16, 2021 20:20
API Design for socket library

Socket Module API

To those familiar with the Unix socket API, the method names will feel familiar, though their usage will be somewhat simpler than the raw Unix socket API. The Module will comprise of four records which will abstract lower order functions to higher and more intutive methods for user:

  • ipAddr : Address information storage structure.
  • tcpConn : A TCP Socket with established connection
  • tcpListener : A TCP Socket listening for connections
  • udpSocket : A connection less UDP Socket

Address Information

@king-11
king-11 / blocking_action.c
Created July 10, 2021 17:22
Qthread socket debugging
#include <stdio.h> //printf
#include <string.h> //strcpy
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <netinet/tcp.h>
#include <netdb.h>
#include <fcntl.h>
#include <stdlib.h>
#include <errno.h>
@king-11
king-11 / socket_libraries.md
Last active June 8, 2021 06:20
Comparing Socket Library of different languages

Socket Libraries

  • Julia
  • Go
  • Python

Julia

Julia uses two types of socket structs one is TCPServer other is TCPSocket similarly we also have UDPSocket

@king-11
king-11 / cloudSettings
Last active August 15, 2020 13:38
Visual Studio Code Settings Sync Gist
{"lastUpload":"2020-08-15T13:38:09.279Z","extensionVersion":"v3.4.3"}
@king-11
king-11 / laravel-ajax-form.js
Created June 24, 2020 09:00 — forked from mp035/laravel-ajax-form.js
Convert any standard HTML form to ajax by adding a few classes to the components and including this file. (see comments)
// notes on using this file:
// This file is intended to work with a standard html form the same as what you use for server side rendered laravel projects.
// The only changes you need to make to the form are:
// 1. Add the class "ajax-submit" to any form you want to be submitted via ajax.
// 2. If you have a "Cancel" button on your form, mark it with the class "form-cancel"
// 3. Add a bootstrap alert in your form, marked with the class "ajax-error-alert" and "collapse" (to keep it initally hidden). This alert will display any error messages.
// Then call the function "AttachAjaxSubmit()" after the DOM is loaded.
// NOTE: This script requires bootstrap to style the components during the submission process.