Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
Single

Sergey Stolyarov sigsergv

💭
Single
  • Novosibirsk, Russia
View GitHub Profile
View gist:5329458
set langmap=ёйцукенгшщзхъфывапролджэячсмитьбюЁЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮ;`qwertyuiop[]asdfghjkl\\;'zxcvbnm\\,.~QWERTYUIOP{}ASDFGHJKL:\\"ZXCVBNM<>
nmap Ж :
" yank
nmap Н Y
nmap з p
nmap ф a
nmap щ o
nmap г u
nmap З P
@sigsergv
sigsergv / folds.py
Last active Jun 16, 2022
python fold tasks
View folds.py
def flen(lst):
return reduce(lambda acc, x: acc + 1, lst, 0)
def flpos(lst, item):
def f(acc, x):
found, pos = acc
if found != -1:
return acc
if x == item:
return pos, pos
@sigsergv
sigsergv / README.md
Last active Mar 25, 2021 — forked from p1-olm/woof3.py
woof.py fork with Python3 support and PEP8 compliant (http://www.home.unix-ag.org/simon/woof.html)
View README.md

This is a ported to python3 version of classic woof utility.

In this fork some bugs have been fixed:

  • upload (option -U) crashes program (FIXED)
View building gqrx with brew.md

Overview

This document describes how to compile GQRX using native OSX Qt 5 and libraries from brew.

Requierements

Skip any part if you have corresponding component already installed.

Mac OS X 10.10 Yosemite

View bfs-norecursion.cpp
#include <iostream>
#include <queue>
struct TreeNode {
int payload;
TreeNode * left;
TreeNode * right;
};
typedef std::queue<int> payload_queue;
View gist:71ee956f4a14428f866d

Saved from: https://www.reddit.com/r/AskReddit/comments/2s9u0s/what_do_insanely_wealthy_people_buy_that_ordinary/

I can answer this one. For some reason, I attract these people into my life. I don't do anything super extraordinary. I am not famous. But I count many peoplewith ultra high net wealth among my close friends and I have spent more time than even I can believe with 8 different billionaires. This is not just meet-and-greet time. This is small group and even one-to-one time. I dated the daughter of one billionaire several decades ago. So I have gotten a peek into this life.

Let's get one thing out of the way. There are gradations of rich. I see four major breaking points:

Worth $10mm-$30mm liquid (exclusive of value of primary residence). At this level, your needs are met. You can live very comfortably at a 4-star/5-star level. You can book a $2000 suite for a special occassion. You can fly first class internationally (sometimes). You have a very nice house, you can afford any healthcare you need,

View gist:f9b986c00b3607c6ac2a
#!/usr/bin/python3
import http.client
import urllib.parse
import json
import time
API_TOKEN = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX'
BASE_URL = '/bot{token}/'.format(token=API_TOKEN)
HEADERS = {'Content-Type': 'application/x-www-form-urlencoded'}
View archive.org-certificate.txt
-----BEGIN CERTIFICATE-----
MIICATCCAWoCCQD1ui5gnJHbtDANBgkqhkiG9w0BAQUFADBFMQswCQYDVQQGEwJB
VTETMBEGA1UECAwKU29tZS1TdGF0ZTEhMB8GA1UECgwYSW50ZXJuZXQgV2lkZ2l0
cyBQdHkgTHRkMB4XDTE0MTAxMzEyNDYwM1oXDTE0MTExMjEyNDYwM1owRTELMAkG
A1UEBhMCQVUxEzARBgNVBAgMClNvbWUtU3RhdGUxITAfBgNVBAoMGEludGVybmV0
IFdpZGdpdHMgUHR5IEx0ZDCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAt4ka
Npv6pBCK9BAVr8y7FgNkrvwtAOwfjR8HZwkHwk0xgbjt7UJQVvqdlTVOhEIscwVS
KQAGrw9d0pfjRjgNZWNbw2KKfEjc5J4eByLnCrG0DtAfohgyLVppv8n5T0UgCH4A
T3XPVLj/qdenv7ySbrNPdIq8TTlDVv+0Awsu8KcCAwEAATANBgkqhkiG9w0BAQUF
AAOBgQBnYRFTWiLxrCbU3AQjLaEfGN6Kb1yf1Y2xxm/XkYPEoCN23zy3Yt3674KE
View gist:8642792
smartctl 6.2 2013-07-26 r3841 [x86_64-linux-3.11-2-amd64] (local build)
Copyright (C) 2002-13, Bruce Allen, Christian Franke, www.smartmontools.org
=== START OF INFORMATION SECTION ===
Model Family: Seagate Barracuda 7200.12
Device Model: ST3500410AS
Serial Number: 5VM0HMH0
LU WWN Device Id: 5 000c50 013a064fd
Firmware Version: CC34
User Capacity: 500,107,862,016 bytes [500 GB]
View gist:8572739
# lxc-checkconfig
Kernel configuration not found at /proc/config.gz; searching...
Kernel configuration found at /boot/config-3.11-2-amd64
--- Namespaces ---
Namespaces: enabled
Utsname namespace: enabled
Ipc namespace: enabled
Pid namespace: enabled
User namespace: missing
Network namespace: enabled