Skip to content

Instantly share code, notes, and snippets.

@rogerioagjr
rogerioagjr / conveyor_chaos.py
Created December 17, 2024 20:08
Meta Coding Puzzles - Level 4 - Conveyor Chaos (Python)
from typing import List
from sortedcontainers import SortedList
# Write any import statements here
def getMinExpectedHorizontalTravelDistance(N: int, H: List[int], A: List[int], B: List[int]) -> float:
conveyors = get_conveyors(H, A, B)
find_conveyors_below(conveyors)
find_init_probs(conveyors)
find_total_probs(conveyors)
import os
import time
import json
import pprint
import csv
import aiwand
import pymupdf4llm
import textract
from pypdf import PdfReader
@Zoobdude
Zoobdude / fin_nuke.sh
Created July 6, 2023 19:30
Completely remove jellyfin
#!/usr/bin/env.
systemctl disable jellyfin
systemctl stop jellyfin
apt purge jellyfin-server
apt purge jellyfin-web
apt autoremove
rm -r /$HOME/.local/share/jellyfin/
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active December 23, 2025 01:07
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This does not works in browser for quests which require you to play a game! Use the desktop app to complete those.

How to use this script:

  1. Accept a quest under Discover -> Quests
  2. Press Ctrl+Shift+I to open DevTools
  3. Go to the Console tab
  4. Paste the following code and hit enter:
@lelinhtinh
lelinhtinh / type-vietnamese-on-ubuntu.md
Last active December 23, 2025 00:58
Gõ Tiếng Việt trong Ubuntu

Gõ Tiếng Việt trong Linux

Ghi chú cách dùng IBus Bamboo để gõ Tiếng Việt mà không bị lỗi gạch chân như các bộ gõ khác.

Cài đặt

sudo add-apt-repository ppa:bamboo-engine/ibus-bamboo
sudo apt-get update
sudo apt-get install ibus ibus-bamboo --install-recommends
// ==UserScript==
// @name Chub Desloppifier
// @namespace Violentmonkey Scripts
// @match https://*.chub.ai/*
// @match https://*.characterhub.org/*
// @version 1.7
// @author khanonnie
// @description Tries to clean up the flood of shit cards on chub.ai.
// @require https://openuserjs.org/src/libs/sizzle/GM_config.js
// @homepageURL https://gist.github.com/khanonnie/b357f20bfe4e920d8e05fd47f1e6fa75
@HimDek
HimDek / Install Windows Subsystem for Android on any Edition of Windows 11 non Insider.md
Last active December 23, 2025 00:55
This Guide will show you how to Install Windows Subsystem for Android or WSA on any Edition of Windows 11 non Insider release.

Install Windows Subsystem for Android on Windows 11 non Insider

WSA or Windows Subsystem for Android is a Tool that allows Windows to run Android Apps directly without using any emulator. The problem is Windows Subsystem for Android is currently only available through preview via the Beta Channel of the Windows Insider Program. But if you follow this guide, you don't have to be in Windows Insider Program to try it out. The only thing you need is Windows 11 installed and some patience.

Prerequisites:

  • A Device with any version and Edition of Windows 11 installed.
  • Internet Connection.
  • Hyper-V enabled.

Enable Hyper-V:

@avidLearnerInProgress
avidLearnerInProgress / template.cpp
Created June 1, 2019 13:14
Competitive programming C++ template
#include <bits/stdc++.h> // Include every standard library
using namespace std;
typedef long long LL;
typedef pair<int, int> pii;
typedef pair<LL, LL> pll;
typedef pair<string, string> pss;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<pii> vii;
@Dobby233Liu
Dobby233Liu / Froyocomb Helper.user.js
Last active December 23, 2025 00:32
Froyocomb Helper: Tool for speeding up the process of finding commits from before a specific date (i.e. included with a specific build). Developed for Froyocomb, the Android pre-release source reconstruction project.
// ==UserScript==
// @name Froyocomb Helper
// @namespace https://dobby233liu.neocities.org
// @version v1.1.8a
// @description Tool for speeding up the process of finding commits from before a specific date (i.e. included with a specific build). Developed for Froyocomb, the Android pre-release source reconstruction project.
// @author Liu Wenyuan
// @match https://android.googlesource.com/*
// @match https://chromium.googlesource.com/*
// @grant GM_addStyle
// @grant GM_getValue
@tmilos
tmilos / README.md
Last active December 23, 2025 00:31
Modified Preorder Tree Traversal

Modified Preorder Tree Traversal

Hierarchical data metrics that allows fast read operations on tree like structures.

Based on Left and Right fields that are set during tree traversal. When entered into node value is set to it's Left, when exiting node value is set to it's Right.

Sample implementation