Oops, I was too lazy to implement the RGB to HSL conversion myself, hence you need the colormath.
get_color_name((241, 95, 188)) # 'pink'
/* моя волна */ | |
.rup__animation { display: none; } /* дебильная анимация моей волны */ | |
.rup { display: none; } /* хотя нет, вся "моя волна" дебильная */ | |
/* делаем поменьше отступы основной части интерфейса */ | |
.centerblock { | |
padding: 10px 30px 60px; | |
} | |
.d-header__title { |
Oops, I was too lazy to implement the RGB to HSL conversion myself, hence you need the colormath.
get_color_name((241, 95, 188)) # 'pink'
{ | |
"title": "Fn improvements (gist.github.com/hatarist)", | |
"rules": [ | |
{ | |
"description": "Change Fn+key to Ctrl+key", | |
"manipulators": [ | |
{ | |
"from": { | |
"key_code": "spacebar", | |
"modifiers": { |
def ppprint(data, fields=None, precision=2): | |
""" | |
P-P-PRETTY PRINTER! | |
>>> ppprint([{"foo": 1.2, "bar": "beer"}, {"foo": "bazzzzz", "bar": "bad"}]) | |
""" | |
if fields is None: | |
fields = list(data[0].keys()) | |
formatted_fields = [] |
import re | |
def clean_json(payload): | |
# remove C-style comments | |
payload = re.sub(re.compile("/\*.*?\*/",re.DOTALL), '', payload) | |
payload = re.sub(re.compile("//.*?\n" ), '', payload) | |
# remove trailing commas | |
payload = re.sub(re.compile(r',\s*?([\]\}])'), r'\1', payload) | |
return payload |
#!/bin/bash | |
export threads=10 | |
export src="/home/local/stuff/" | |
export dest="scp@govno:/home/remote/stuff/" | |
rsync -aL -f"+ */" -f"- *" $src $dest && (cd $src && find . -type f | xargs -n1 -P$threads -I% rsync -av % $dest/% ) |
import random | |
import sys | |
from netaddr import IPNetwork, IPAddress | |
def generate_random_ipv6(subnet): | |
network = IPNetwork(subnet) | |
return str(IPAddress(random.randrange(network.first, network.last))) |
:) CREATE TABLE my_table (date Date DEFAULT today(), s String) ENGINE = MergeTree(date, (date), 8192); | |
:) INSERT INTO my_table (s) VALUES ('1. foo'); | |
:) ALTER TABLE my_table ADD COLUMN f Float64; | |
:) INSERT INTO my_table (s) VALUES ('2. bar'); | |
:) SELECT * FROM my_table; |
Copy this URL and paste it into the address bar to import it in the Karabiner Elements:
karabiner://karabiner/assets/complex_modifications/import?url=https://gist.githubusercontent.com/hatarist/f2888c1940e7ebccfeea184181c7726b/raw/karabiner-fn-to-ctrl.json)
SELECT | |
*, | |
pg_size_pretty(table_bytes) AS table, | |
pg_size_pretty(index_bytes) AS index, | |
pg_size_pretty(total_bytes) AS total | |
FROM ( | |
SELECT | |
*, total_bytes - index_bytes - COALESCE(toast_bytes, 0) AS table_bytes | |
FROM ( | |
SELECT |