Skip to content

Instantly share code, notes, and snippets.

This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<html lang="cs" class="scroll-pt-mobileHeader md:scroll-pt-desktopHeader" data-astro-transition-scope="astro-smooz4hq-1">
<head>
<meta name="sentry-trace" content="ae2eb7aff4c10a2903be9ab254bd6747-37995ee34e20d1e8-0"/>
<meta name="baggage" content="sentry-environment=production,sentry-release=v2.0.43,sentry-public_key=c74f7db661ae4cad8d94282c184d08f9,sentry-trace_id=ae2eb7aff4c10a2903be9ab254bd6747,sentry-sampled=false"/>
<meta name="version" content="v2.0.43">
<link rel="preconnect" href="https://fonts.googleapis.com" crossorigin>
<link rel="dns-prefetch" href="https://fonts.googleapis.com/">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link rel="dns-prefetch" href="https://fonts.gstatic.com/">
@mymtw
mymtw / alacritty.yml
Created March 9, 2023 07:53
alacritty config
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# Import additional configuration files
#
# Imports are loaded in order, skipping all missing files, with the importing
# file being loaded last. If a field is already present in a previous import, it
# will be replaced.
#
# All imports must either be absolute paths starting with `/`, or paths relative
# to the user's home directory starting with `~/`.
set $mod Mod4
font pango:monospace 8
exec "setxkbmap -layout us,ru"
exec "setxkbmap -option 'grp:alt_shift_toggle'"
exec --no-startup-id dex --autostart --environment i3
exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
@mymtw
mymtw / torrc
Created August 16, 2022 13:18
torrc config with using bridges to get around ISP blocks
## Configuration file for a typical Tor user
## Last updated 28 February 2019 for Tor 0.3.5.1-alpha.
## (may or may not work for much older or much newer versions of Tor.)
##
## Lines that begin with "## " try to explain what's going on. Lines
## that begin with just "#" are disabled commands: you can enable them
## by removing the "#" symbol.
##
## See 'man tor', or https://www.torproject.org/docs/tor-manual.html,
## for more options you can use in this file.
package main
import (
"context"
"encoding/json"
"fmt"
"github.com/hashicorp/go-retryablehttp"
"io/ioutil"
"log"
"net/http"
pub const WEI_IN_ETHER: U256 = U256([0x0de0b6b3a7640000, 0x0, 0x0, 0x0]);
#[derive(Debug)]
pub enum ConversionError {
UnrecognizedUnits(String),
TextTooLong,
}
/// Common Ethereum unit types.
@mymtw
mymtw / queries at now
Created March 17, 2021 14:12
queries at now
crypto=# SELECT pid, age(clock_timestamp(), query_start), usename, query
FROM pg_stat_activity
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%'
ORDER BY query_start desc;
-[ RECORD 1 ]---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
pid | 24
age |
usename |
query |
-[ RECORD 2 ]-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
openapi: 3.0.0
info:
title: title
version: 1.0.0
servers:
- url: http://127.0.0.1:8080
paths:
/bad:
@mymtw
mymtw / createwif.go
Last active November 30, 2020 02:03
import (
"errors"
"fmt"
"github.com/btcsuite/btcd/chaincfg"
"github.com/btcsuite/btcutil"
"github.com/btcsuite/btcutil/hdkeychain"
"github.com/btcsuite/btcd/btcec"
@mymtw
mymtw / btc
Last active May 17, 2020 17:52
bitcoin
./bitcoin-cli -regtest -rpcwallet=wallet1 listunspent
[
{
"txid": "a9a39d9f388eb7d2d99f79d5f31f0e076a37061b1de5b104fa7500a481cba95b",
"vout": 0,
"address": "2N8RF8rrwxLKtRYLfpRkf9p65hpND3AAFwT",
"label": "",
"redeemScript": "0014dd47e79764938c67a961893b91c97f5cd67517a7",
"scriptPubKey": "a914a66f012b7489f2af076a2a6cebf18658d186080487",
"amount": 50.00000000,