Skip to content

Instantly share code, notes, and snippets.

const bitcoinjs = require('bitcoinjs-lib') // @3.3.2
const bip39 = require('bip39')
const clone = require('lodash.clonedeep')
const networks = bitcoinjs.networks
const script = bitcoinjs.script
/*
Bitcoin 0x0488b21e - xpub 0x0488ade4 - xprv P2PKH or P2SH
Bitcoin 0x049d7cb2 - ypub 0x049d7878 - yprv P2WPKH in P2SH
@zhashkevych
zhashkevych / threadsvsgoroutines.md
Last active April 16, 2024 17:10
Основные различия между потоками ОС и горутинами языка Go
Потоки Горутины
Потоки ОС управляются ядром ОС Горутины управляются "рантаймом" Go
Потоки ОС в основном имееют фиксированый размер в 1-2MB Горутины обычно имеют размер стэка 2KB
Размер стэка определяется во время компиляции и не может увеличиватся Размер стэка определяется во время рантайма и может расти вплоть до 1GB что возможно благодаря аллокации и освобождения места из хипа
У потоков нету простого способа коммуникации между собой. Такая коммуникация имеет большую задержку Горутины используют "каналы" для быстрого общения между собой с маленькой задержкой
Finding default branch for caesar0301/awesome-public-datasets
Found: master for caesar0301/awesome-public-datasets — An awesome list of high-quality open datasets in public domains (on-going). — 6089⭐️ — last updated 10 days ago
🔎 Checking 355 links
⚪ https://travis-ci.org/caesar0301/awesome-public-datasets.svg
⚪ https://groups.google.com/forum/#!forum/awesomepublicdatasets
✅ https://github.com/caesar0301/awesome-public-datasets
✅ https://github.com/bayandin/awesome-awesomeness
✅ https://travis-ci.org/caesar0301/awesome-public-datasets
✅ https://github.com/sindresorhus/awesome
✅ https://github.com/sindresorhus/awesome
@Minionguyjpro
Minionguyjpro / Activate_Windows_8_8.1_10_and_11_Pro_for_Free.md
Last active April 16, 2024 17:09
Activate Windows 8, 8.1, 10 and 11 Pro for Free

Activate Windows 8, 8.1, 10 and 11 Pro for Free

A guide how to get and activate Windows 8, 8.1, 10 and 11 Pro for free!

NOTE

If you see the Windows keyboard button in this guide; and you can't find it on your keyboard, you likely have/had Windows 10 which has the button . If you can't find that one, you likely have a PC that has been upgraded to Windows 8/8.1/10/11 from Windows 8.1/8/7/Vista/XP and other ones. If you have one of those, refer the Windows key button to as yours. A list of them is below:

Windows key buttons

- Windows 11

- Windows 10

@ebouchut
ebouchut / disable_postgres_autostart_on_macos
Created April 16, 2014 08:42
Disable Postgres (installed with Homebrew) autostart on MacOS
launchctl unload -w ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist
@liweitianux
liweitianux / nginx.google.conf
Created July 17, 2021 03:44
Nginx Proxy to Google
#
# Nginx reverse proxy to Google Search (with images and webcache))
#
# Credit:
# * Nginx rewrite append a parameter at the end of an URL
# https://serverfault.com/a/311660/387898
# * https://github.com/tracycool/Reverse-Proxy-for-Google
# * https://github.com/caiguanhao/nginx-bypass-gfw/blob/master/google.conf
#
# References:
@mattclements
mattclements / function.php
Last active April 16, 2024 17:04
Wordpress Disable Comments (add to function.php)
<?php
add_action('admin_init', function () {
// Redirect any user trying to access comments page
global $pagenow;
if ($pagenow === 'edit-comments.php') {
wp_redirect(admin_url());
exit;
}
@marcogrcr
marcogrcr / sigv4_using_http_client.py
Last active April 16, 2024 17:03
Send request with SigV4 in python using boto3
from boto3.session import Session
from botocore.auth import SigV4Auth
from botocore.awsrequest import AWSRequest
from botocore.credentials import Credentials
from http.client import HTTPConnection, HTTPSConnection
import json
import os
from urllib.parse import urlparse
def sigv4_request(
import torch
import torch.nn.functional as F
def to_float8(x, dtype=torch.float8_e4m3fn):
finfo = torch.finfo(dtype)
# Calculate the scale as dtype max divided by absmax
scale = finfo.max / x.abs().max().clamp(min=1e-12)
# scale and clamp the tensor to bring it to
# the representative range of float8 data type
# (as default cast is unsaturated)
@tykurtz
tykurtz / grokking_to_leetcode.md
Last active April 16, 2024 17:03
Grokking the coding interview equivalent leetcode problems

GROKKING NOTES

I liked the way Grokking the coding interview organized problems into learnable patterns. However, the course is expensive and the majority of the time the problems are copy-pasted from leetcode. As the explanations on leetcode are usually just as good, the course really boils down to being a glorified curated list of leetcode problems.

So below I made a list of leetcode problems that are as close to grokking problems as possible.

Pattern: Sliding Window