Skip to content

Instantly share code, notes, and snippets.

@gubatron
gubatron / dht-walkthrough.md
Last active April 24, 2024 11:14
DHT walkthrough notes

DHT Walkthrough Notes

I've put together these notes as I read about DHT's in depth and then learned how the libtorrent implementation based on the Kademlia paper actually works.

What problem does this solve?

400,000,000,000 (400 billion stars), that's a 4 followed by 11 zeros. The number of atoms in the universe is estimated to be around 10^82. A DHT with keys of 160 bits, can have 2^160 possible numbers, which is around 10^48

@RedenticDev
RedenticDev / Explanations.md
Last active April 24, 2024 11:12
Xcode 12 & Theos

What's the problem?

Since June, 22nd 2020, Apple released Xcode 12, that introduced an internal change to Xcode, breaking arm64e compilation for tweak developers. This is due to the update of clang/LLVM (AFAIK) in Xcode 12.

Details of the problem

More specifically:

  • compiling code for arm64e with Xcode 11 Toolchain will allow this code to run only on iOS 13 and lower for all versions!.
  • compiling code for arm64e with Xcode 12 Toolchain will allow this code to run only for iOS 14 (and up).

No error is produced during compilation. arm64 slices are not concerned and will always work.

@dnncomp
dnncomp / Docker. Работа с образами.md
Last active April 24, 2024 11:10
[Docker. Работа с образами] #docker

Работа с образами

docker images или docker image ls — посмотреть список образов

docker rmi <образ> [образ...] или docker image rm <образ> [образ...] — удалить образ(ы)

Работа с контейнерами

docker run <образ> — поднять контейнер на основе образа

@GoodThaumiel
GoodThaumiel / index.html
Created April 24, 2024 11:09
Life timeline
<header>
<nav>
<ul id="main_nav">
<li class="active all" data-title="all" title="All">All</li>
<li class="icon-address active" data-title="life" title="Life Events"></li>
<li class="icon-graduation-cap active" data-title="education" title="Education"></li>
<li class="icon-briefcase active" data-title="work" title="Work"></li>
<li class="icon-user active" data-title="user" title="Additional Info"></li>
</ul>
@aradalvand
aradalvand / DockerfileForSvelteKit.md
Last active April 24, 2024 11:09
Dockerfile and .dockerignore for SvelteKit:

*This Dockerfile is intended for SvelteKit applications that use adapter-node. So, the Dockerfile below assumes that you have already installed and configured the adapter.

Dockerfile:

FROM node:18-alpine AS builder
WORKDIR /app
COPY package*.json .
RUN npm ci
COPY . .
RUN npm run build
@fa7ad
fa7ad / yt-loudness.user.js
Last active April 24, 2024 11:04 — forked from WouterG/tampermonkey-script.js
Disable youtube volume normalization (allow true video 100% volume)
// ==UserScript==
// @name YouTube Disable Normalization
// @namespace https://gist.github.com/fa7ad/fa995474f5cb9fe91fb209686881373d
// @version 0.2
// @description Allows true 100% volume on youtube videos.
// @author Wouter Gerarts
// @match https://www.youtube.com/*
// @match https://youtube.com/*
// @grant none
// ==/UserScript==
@abulka
abulka / fncache.py
Last active April 24, 2024 11:03 — forked from kwarrick/fncache.py
Redis-backed LRU cache decorator in Python.
#!/usr/bin/env python
__author__ = 'Kevin Warrick'
__email__ = 'kwarrick@uga.edu, abulka@gmail.com'
__version__ = '2.0.0'
import pickle
from collections import namedtuple
from functools import wraps
import inspect
from icecream import ic
@yoki
yoki / html2markdown.py
Created May 23, 2016 05:19
Convert html file to markdown
def html2markdown(self, html):
# convert html to markdown.
# specification:
# remove all tag exccept tags listed in the cleanbody._repl
# when p/div tags are in the table tag, markdown converter (htmlformatter)
# confuses. so it is removed
# we need following in the header
# import re, html2text
# from bs4 import BeautifulSoup
@EDDxample
EDDxample / Lattice Basics.ipynb
Last active April 24, 2024 11:02
Lattice Basics for RNG Seed finding
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@MuhammadSaim
MuhammadSaim / rarreg.key
Last active April 24, 2024 11:00
Step 1: Create a file called rarreg.key Step 2: Paste into the file the raw content of this gist Step 3: Go to Winrar install directory (by default => c:\ProgramFiles\WinRAR\ ) Step 4: Paste the rarreg.key into WinRAR directory Step 5: Enjoy
RAR registration data
WinRAR
Unlimited Company License
UID=4b914fb772c8376bf571
6412212250f5711ad072cf351cfa39e2851192daf8a362681bbb1d
cd48da1d14d995f0bbf960fce6cb5ffde62890079861be57638717
7131ced835ed65cc743d9777f2ea71a8e32c7e593cf66794343565
b41bcf56929486b8bcdac33d50ecf773996052598f1f556defffbd
982fbe71e93df6b6346c37a3890f3c7edc65d7f5455470d13d1190
6e6fb824bcf25f155547b5fc41901ad58c0992f570be1cf5608ba9