Skip to content

Instantly share code, notes, and snippets.

View kalloc's full-sized avatar
🌋

kalloc kalloc

🌋
View GitHub Profile
@kalloc
kalloc / clock.html
Last active November 25, 2020 20:28 — forked from sam0737/clock.html
OBS Studio: A HTML page for showing current date and time in the video
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>A simple clock</title>
</head>
<body translate="no" >

SQL

  • Чем SQL отличается от NoSQL
  • Что такое транзакции?
  • Что такое CAP теорема?
  • Что такое ACID?

Python

  • Что такое GIL? Его особенности работы (конкурентность vs параллелизм)
@kalloc
kalloc / latency.txt
Created July 3, 2018 18:56 — forked from jboner/latency.txt
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@kalloc
kalloc / async.md
Created September 3, 2017 17:44 — forked from chriseth/async.md
Async Solidity Contracts

Having seen @pirapira's sketch of Bamboo ( https://github.com/pirapira/bamboo/ ), which proposed to add better control about the "smart contract program flow", even across calls, I thought that this should certainly be added to Solidity, and actually, it might even be possible now to a certain degree using inline assembly.

The problem is that with many functions in a contract, it is not always clear which can be called at which stage in the contract's lifetime. Certain smart contracts would be easier to understand if written as follows:

# habraproxy.py — это простейший http-прокси-сервер, запускаемый локально (порт на ваше
# усмотрение), который показывает содержимое страниц Хабра. С одним исключением: после
# каждого слова из шести букв должен стоять значок «™». Примерно так:
#
# http://habrahabr.ru/company/yandex/blog/258673/
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
# Сейчас на фоне уязвимости Logjam все в индустрии в очередной раз обсуждают проблемы и
# особенности TLS. Я хочу воспользоваться этой возможностью, чтобы поговорить об одной из
# них, а именно — о настройке ciphersiutes.
#
@kalloc
kalloc / index.html
Created November 21, 2015 22:02 — forked from anonymous/index.html
JS Bin Анимированное подчеркивание при наведении курсора // source http://jsbin.com/humeso
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Анимированное подчеркивание при наведении курсора">
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
body {
font-family: -apple-system, "San Francisco", "Helvetica Neue", "Lucida Grande";
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline5-dev libyaml-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz
tar -xvzf ruby-1.9.3-p125.tar.gz
cd ruby-1.9.3-p125/
./configure --prefix=/usr/local
make
make install
@kalloc
kalloc / 0_reuse_code.js
Created December 13, 2013 14:16
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console