Skip to content

Instantly share code, notes, and snippets.

View shilch's full-sized avatar
:octocat:
May the forks be with you

Simon shilch

:octocat:
May the forks be with you
View GitHub Profile
@ddemidov
ddemidov / Makefile
Created June 13, 2012 18:38
Hello world in OpenCL
hello: hello.cpp
g++ -std=c++0x -o hello hello.cpp -lOpenCL
@kekru
kekru / add CA cert on CentOS Debian Ubuntu.md
Last active July 29, 2024 12:10
Add CA cert to local trust store on CentOS, Debian or Ubuntu
  • Open a webpage that uses the CA with Firefox
  • Click the lock-icon in the addressbar -> show information -> show certificate
  • the certificate viewer will open
  • click details and choose the certificate of the certificate-chain, you want to import to CentOS
  • click "Export..." and save it as .crt file
  • Copy the .crt file to /etc/pki/ca-trust/source/anchors on your CentOS machine
  • run update-ca-trust extract
  • test it with wget https://thewebsite.org
@asukakenji
asukakenji / 0-go-os-arch.md
Last active November 6, 2024 03:19
Go (Golang) GOOS and GOARCH

Go (Golang) GOOS and GOARCH

All of the following information is based on go version go1.17.1 darwin/amd64.

GOOS Values

GOOS Out of the Box
aix
android
@serg0x
serg0x / material-design-shadows.css
Last active November 1, 2024 00:27
Google material design elevation system shadows as css. Based on https://material.io/design/environment/elevation.html#default-elevations Exported with Sketchapp from the Google material design theme editor plugin "Baseline" theme.
/* Shadow 0dp */
box-shadow: none;
/* Shadow 1dp */
box-shadow: 0 1px 1px 0 rgba(0,0,0,0.14), 0 2px 1px -1px rgba(0,0,0,0.12), 0 1px 3px 0 rgba(0,0,0,0.20);
/* Shadow 2dp */
box-shadow: 0 2px 2px 0 rgba(0,0,0,0.14), 0 3px 1px -2px rgba(0,0,0,0.12), 0 1px 5px 0 rgba(0,0,0,0.20);
/* Shadow 3dp */
@stoichammer
stoichammer / Transpose-Merkle-Tree.md
Last active February 9, 2020 12:54
Introducing the Transpose Merkle Tree

Introducing the Transpose Merkle Tree

A Transpose Merkle Tree (TMT) is a data structure wherein interim nodes are transposed such that the walk from the leaf node to the root node essentially contains the Merkle branch(proof). The leaf & root nodes remain in the same position/s as in a standard Merkle tree.

This post includes,

  • a highly efficient algorithm to compute the TMT with only O(3 log n) space complexity (primary memory).
  • a compact pre-ready data-structure, that can be persisted in a graph database(Neo4j), and can readily serve Merkle branch/paths trivially, traversal (by DB engine) of only O(log n) nodes.

The algorithm needs to store only the node-id, left-child-id, right-child-id for each height of the Merkle tree, hence the 3 log n. And the recursive algorithm shown below simultaneously constructs the intermediate nodes & transposes them appropriately upto the final root node recursively, with this simple structure. The time complexity of TMT construction is comparable to the standar

@synfonaut
synfonaut / bitcoinsv.md
Last active August 1, 2023 15:22
Bitcoin SV Stable Protocol Restoration

Bitcoin SV Stable Protocol Restoration

These are the pending changes to Bitcoin SV's stable protocol — many of these were changed/removed by BTC/BCH and are being restored carefully or in ways that fix the original issues. Other changes are primarily scaling parameters or optimizations.

Remove dust limit & 0-satoshi utxos

Once upon a time some BTC developers, mindful of their parental responsibilities to all participants in the Bitcoin network, introduced a protective mechanism called the Dust limit

This limit will be removed entirely by the end of the year allowing even 0 value outputs.