Skip to content

Instantly share code, notes, and snippets.

@kfur
kfur / td_bench.cc
Created September 15, 2021 12:36
Tdlib aes ige benchmark
//
// Copyright Aliaksei Levin (levlam@telegram.org), Arseny Smirnov (arseny30@gmail.com) 2014-2021
//
// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
#include "td/utils/crypto.h"
#include "td/utils/Slice.h"
#include <fstream>
#include <iostream>
@kfur
kfur / yreplay2srt.py
Last active October 25, 2021 01:54
Youtube live chat replay to srt subtitles
import pysrt
import json
import sys
import functools
import emoji
from urllib import request
import re
class LiveChat():
@kfur
kfur / darkreader.js
Last active September 23, 2024 17:51
Dark Reader userscript for Safari browser
// ==UserScript==
// @name DarkReader
// @match *://*/*
// @grant none
// @run-at document-start
// ==/UserScript==
// MIT License
// Copyright (c) 2019 Alexander Shutau
www.xiaomonv.club
dazhaogai.cn
dnbmlm.cn
dnfmtj.cn
mmmdcn.cn
tencent.net.cn
nmgdkp.cn
.qlogo.cn
1shp.qlogo.cn
app.qlogo.cn
@kfur
kfur / blacklist.txt
Last active September 17, 2019 10:24
Domain list for dnscrypt-proxy
s.youtube.com
device-provisioning.googleapis.com
wide-youtube.l.google.com
redirector.googlevideo.com
video-stats.l.google.com
asdkd.tutuapp.com
baidu.com
wshifen.com
snap.snapmobile.asia
@kfur
kfur / invert.js
Created July 2, 2019 20:12
Inverting html page colors
/* Leading rule */
html {
-webkit-filter: invert(100%) hue-rotate(180deg) brightness(80%) contrast(120%) !important;
filter: invert(100%) hue-rotate(180deg) brightness(80%) contrast(120%) !important;
}
/* Reverse rule */
img,
video,
:not(object):not(body)>embed,
@kfur
kfur / mc3man-media.key
Created April 3, 2019 17:59
Public key for ppa:mc3man/trusty-media repo
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v1
mI0EUZpuEAEEANNsNCw3jhNddXVg+c1qQEfulNlK1tWkA8nvjLNb7rqCgtQF8lU9
xOPsMkKrMVvMUSX7mGhLZ+k4ClJWCFw1xshg8Qj6AbZO94/8x10SrtUAQVOotIs6
91qwB5kfQXgNjUsZAQx0LU1ZCIzGX23moa/W195i+ejNTB6TW4XF6e0rABEBAAG0
HkxhdW5jaHBhZCBQUEEgZm9yIERvdWcgTWNNYWhvboicBBABAgAGBQJWw3gQAAoJ
EAQLpOs7f4HaiyQD/A9aLK2PdtZhZGt/QHq7do99OoiXU9G9v1P3zfYqbmQNR0CV
PNwU7oR6sR1OAOwHp5Sc6PY/Sw8X1fI+uqzIRsYRkkkcRvMdzcJ5XeogykrPUoEH
rUCPDPTDwRs4txhGCYWrYU3BOnnWDkB4YMFq+tOo1pAWx/tgnXjLYHXbnA1ciLgE
@kfur
kfur / blockerList.json
Created March 29, 2019 15:17
Safari Content Blocker list for google search cookies blocking
[
{
"trigger":
{
"url-filter": "^https?://[a-z]+.google.[.a-z]+/?$",
"if-domain": ["www.google.ac", "www.google.ad", "www.google.ae", "www.google.al", "www.google.am", "www.google.as", "www.google.at", "www.google.az", "www.google.ba", "www.google.be", "www.google.bf", "www.google.bg", "www.google.bi", "www.google.bj", "www.google.bs", "www.google.bt", "www.google.by", "www.google.ca", "www.google.cat", "www.google.cc", "www.google.cd", "www.google.cf", "www.google.cg", "www.google.ch", "www.google.ci", "www.google.cl", "www.google.cm", "www.google.cn", "www.google.co.ao", "www.google.co.bw", "www.google.co.ck", "www.google.co.cr", "www.google.co.id", "www.google.co.il", "www.google.co.in", "www.google.co.jp", "www.google.co.ke", "www.google.co.kr", "www.google.co.ls", "www.google.co.ma", "www.google.co.mz", "www.google.co.nz", "www.google.co.th", "www.google.co.tz", "www.google.co.ug", "www.google.co.uk", "www.google.co.uz", "www.google.co.ve", "www.google.co.vi",
@kfur
kfur / DefaultStyle.css
Last active December 12, 2018 11:37
Fix MacOS Mojave Dark mode rendering issue for third-party dictionaries in Dictionary.app by amending DefaultStyle.css file in .dictionary file
html {
background: transparent !important;
}
html.apple_client-panel ul.tags {
display: none;
}
body {
color: text;