Skip to content

Instantly share code, notes, and snippets.

View drushadrusha's full-sized avatar
🌴
on vacation

drusha drushadrusha

🌴
on vacation
View GitHub Profile
@kamilogorek
kamilogorek / _screenshot.md
Last active April 26, 2025 16:35
Clutter-free VS Code Setup
image
@spiritualized
spiritualized / uptime-kuma.conf
Last active January 4, 2025 19:08
Uptime Kuma reverse proxy nginx config for a URL prefix
# nginx configuration snippet for running Uptime Kuma on a URL prefix
# set up for yourdomain.com/kuma, with traffic forwarded to a docker
# container with the hostname 'uptime-kuma'
# Use docker's DNS
resolver 127.0.0.11;
# uptime kuma
location /uptime {
@braindevices
braindevices / #btrfs benchmark for daily used desktop OS
Last active May 5, 2025 07:13
which file sytem to use for daily work? should we turn on btrfs compression?
#btrfs benchmark for daily used desktop OS
@levelsio
levelsio / git_graph.php
Last active June 5, 2023 03:49
GitHub style graph in PHP + CSS
<style>
.git-graph {
text-align: left;
line-height: 1;
}
.git-graph-row {
clear: both;
text-align: left;
}
.git-graph-cell {
@stek29
stek29 / extract_telegram_macos.ipynb
Last active May 12, 2025 14:27
Extract Telegram messages from db_sqlite PostBox – made for Telegram for macOS, but should work with Telegram for iOS
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ofou
ofou / servers.csv
Created April 11, 2021 06:15
List of servers to test speedtest-cli
We can't make this file beautiful and searchable because it's too large.
Country,City,Provider,Host,ID
Abkhazia,Sukhum,Aquafon GSM,62.182.8.78:8080,9058
Abkhazia,Sukhum,"Systema, LTD",cyxym.net:8080,5089
Abkhaziya,Sukhum,A-Mobile,speedtest.a-mobile.biz:8080,9714
Afghanistan,Herat,Afghan Wireless,hrtspeedtest.afghan-wireless.com:8080,9622
Afghanistan,Kabul,Afghan Telecom,sp1.afghantelecom.af:8080,11019
Afghanistan,Kabul,etisalat Afghanistan,speedtest.etisalat.af:8080,21807
Afghanistan,Kabul,Afghan Wireless,speedtest.afghan-wireless.com:8080,5189
Afghanistan,Kabul,Afghan Wireless Communication Company,kdzspeedtest.afghan-wireless.com:8080,13501
Afghanistan,Kabul,Insta Telecom,speedtest.instatelecom.com:8080,12798
@mecid
mecid / ContentView.swift
Last active January 14, 2023 21:46
SwiftUI Drag and Drop example for grid items
import SwiftUI
extension RandomAccessCollection {
func indexed() -> Array<(offset: Int, element: Element)> {
return Array(enumerated())
}
}
struct ContentView: View {
@State private var items: [[String]] = [
#!/bin/bash
PLATFORM=iPhoneOS # iPhoneSimulator # iPhoneOS
HOST=arm-apple-darwin # i386-apple-darwin10 # arm-apple-darwin10
ARCH=arm64 # i386 # armv7s #armv7
SDK_VERSION=13.0
XCODE_ROOT=`xcode-select -print-path`
PLATFORM_PATH=$XCODE_ROOT/Platforms/$PLATFORM.platform/Developer
SDK_PATH=$PLATFORM_PATH/SDKs/$PLATFORM$SDK_VERSION.sdk
@avivace
avivace / telegramRestore.md
Last active May 11, 2025 19:07
Restore deleted Telegram messages from groups

Restore deleted Telegram messages, medias and files from groups

There's not telegram API method for this, we need to call MTProto methods to retrieve messages from the "Recent Actions" (Admin Log) since deleted messages (and medias) gets moved there for 48 hours before the permanent deletion.

from telethon import TelegramClient, events, sync
from telethon.tl.types import InputChannel, PeerChannel
@stropdale
stropdale / dnsLookup.swift
Created July 29, 2019 15:28
DNS IP Address Lookup from Host name in Swift
import UIKit
// You many want to run this in the background
func getIPs(dnsName: String) -> String? {
let host = CFHostCreateWithName(nil, dnsName as CFString).takeRetainedValue()
CFHostStartInfoResolution(host, .addresses, nil)
var success: DarwinBoolean = false
if let addresses = CFHostGetAddressing(host, &success)?.takeUnretainedValue() as NSArray? {
for case let theAddress as NSData in addresses {
var hostname = [CChar](repeating: 0, count: Int(NI_MAXHOST))