Skip to content

Instantly share code, notes, and snippets.

View futpib's full-sized avatar

futpib

View GitHub Profile
@futpib
futpib / ext2scan.c
Last active September 6, 2022 12:09 — forked from countingpine/ext2scan.c
ext2scan: scan for ext2/ext3/ext4 partitions
/* ext2scan:
* Scans an input stream, sector by sector, for something that looks like an ext{2,3,4} partition.
* It does this by looking for a magic WORD, 0xEF53, at a known offset into the sector.
* For random data, this will occur by chance around once per 32MB of data, so we also
* check whether the first two sectors are all zeros, which is commonly true for ext partitions.
*
* Compile with:
* gcc ./ext2scan.c -o ./ext2scan
*
* Example usage:
@futpib
futpib / 0.README.md
Last active May 15, 2018 16:43 — forked from agentcooper/0.README.md
Telegram chat backup/export

How to use

  1. Login to https://web.telegram.org
  2. Copy-paste contents of telegram-scripts.js into JS console
  3. Run showContacts() to get the list of contacts with ids
  4. Run saveChat(userId) where userId is the id from step 3

Process can take a while, check console for progress. Occasionall FLOOD_WAIT errors are expected. Once done, browser will download the JSON file.

Motivation

<?xml version="1.0"?>
<?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
<window id="yourwindow" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<vbox style="background-color:midnightblue; -moz-box-flex: 1;" flex="1">
<vbox orient="vertical" flex="1" style="background-color:skyblue; overflow:auto;" height="1">
<button label="Red"/>
<button label="Blue"/>
<button label="Green"/>
<button label="Yellow"/>
<button label="Orange"/>
magic: policeman_ruleset
version: 0.1
id: "scheme_magnet"
l10n:
en-US:
name: "Allow Magnet Links"
description: "This allows clicking in magnet links"