Skip to content

Instantly share code, notes, and snippets.

View Geograph-us's full-sized avatar
🇺🇦
no war

Geograph Geograph-us

🇺🇦
no war
View GitHub Profile
@joric
joric / telegram_win11_caption_patch.py
Last active November 5, 2024 17:58
A binary patch to fix Telegram caption color in Windows 11
'''
link to latest gist: https://gist.github.com/joric/61a8eb1501f36c8e57408a035cf5a8b0
link to issue: https://github.com/telegramdesktop/tdesktop/issues/26369
how to find signature:
1. open Telegram.exe in idaq64.exe
2. press g, look for DwmSetWindowAttribute (see https://github.com/desktop-app/lib_ui/blob/master/ui/platform/win/ui_window_win.cpp)
3. when it loads, context menu on DwmSetWindowAttribute, list cross references to
4. try a few, in my case it was 6-th from the top, click on it to go to disassembly
5. find start of the subroutine, switch to Hex View-1 tab, copy hex, switch back to disassembly, use toolbar < > to navigate history, repeat
@idkrn123
idkrn123 / expireddomains.net_parser.js
Last active June 28, 2024 14:35
run in console - grabs domain names from table. (i'm using this along with gpt for an experiment in automated domaining :^D)
let rows = document.querySelectorAll('.base1 tbody tr');
let domains = [];
for (let row of rows) {
let domain = row.querySelector('.field_domain a').textContent;
domains.push(domain);
}
console.log(domains.join('\n'));
@lord-alfred
lord-alfred / userscript.js
Last active June 28, 2024 14:31
expireddomains.net tampermonkey/greasemonkey userscript
// ==UserScript==
// @name Expired Domains script
// @namespace http://tampermonkey.net/
// @version 0.2
// @description https://t.me/Lord_Alfred
// @author Lord_Alfred
// @match https://member.expireddomains.net/domains/*/*
// @icon https://www.google.com/s2/favicons?sz=64&domain=expireddomains.net
// @grant none
// @require https://ajax.googleapis.com/ajax/libs/jquery/3.6.1/jquery.min.js
// SPDX-License-Identifier: GPL-2.0
/*
* @author Ammar Faizi <[email protected]> https://www.facebook.com/ammarfaizi2
* @license GPL-2.0
* @package tgvisd::Main::Preload
*
* Copyright (C) 2021 Ammar Faizi <[email protected]>
*/
#if defined(__linux__)
#
# SPDX-License-Identifier: GPL-2.0
#
# Telegram Desktop Patch (tested for version 2.8.6 beta Linux x86_64)
# Don't use it on different version, it may crash!
#
# Author: @ammarfaizi2, @Akiekano, @rLapz
# Link: https://t.me/GNUWeeb/407041
#
# Usage:
@rioto9858
rioto9858 / README.md
Last active November 13, 2024 22:21
Top 50 Spotify music dataset (from 2010 to 2019 )

This is a dataset of top 50 Spotify music from 2010 to 2019. Originally published at Kaggle:Top Spotify songs from 2010-2019 - BY YEAR which is scraped from Spotify: Organize your music

After cleaning the data, it contains 14 columns and 603 rows of data.

The type of attributes: 'title' is categorical. 'artist' is categorical. 'genre of the track' is categorical. 'year' is quantitative.

// Manually export Twitter followers/following data from browser as a CSV
// 1. navigate to followers/following page
// 2. change "target_count" variable value below to desired number
// 3. paste script into Javascript terminal and execute
// 4. once collection is complete and you see download dialogue box - confirm
// x. to stop manually at any time just execute "collect = false"
var collect = true;
var dat = {}
@georg-jung
georg-jung / ProcessAsyncHelper.cs
Last active December 30, 2023 02:14 — forked from AlexMAS/ProcessAsyncHelper.cs
Use https://github.com/Tyrrrz/CliWrap instead, the following code has some shortcomings
using System;
using System.Diagnostics;
using System.Text;
using System.Threading.Tasks;
// based on https://gist.github.com/AlexMAS/276eed492bc989e13dcce7c78b9e179d
public static class ProcessAsyncHelper
{
public static async Task<ProcessResult> RunProcessAsync(string command, string arguments, int timeout)
{
@mingodad
mingodad / fts5-compress-column.diff
Created September 24, 2018 13:49
Implementation of "compressed" and "min_word_size" option for columns in fts5 for sqlite3
Index: ext/fts5/fts5Int.h
==================================================================
--- ext/fts5/fts5Int.h
+++ ext/fts5/fts5Int.h
@@ -160,10 +160,11 @@
char *zDb; /* Database holding FTS index (e.g. "main") */
char *zName; /* Name of FTS index */
int nCol; /* Number of columns */
char **azCol; /* Column names */
u8 *abUnindexed; /* True for unindexed columns */
"""
This script removes stray lines from images using image processing techniques with OpenCV library.
All credit where it's due - https://stackoverflow.com/a/45563349/4411757. Simon Mourier created a script in C# which I
have ported to python. Tested with python 3.5 and opencv-python==3.4.2.17. Shoot your suggestions/improvements in the
comments. Cheers!
"""
def clean_image(img):
height, width = img.shape[:2]