Skip to content

Instantly share code, notes, and snippets.

View shamanNS's full-sized avatar

Predrag Đokić shamanNS

View GitHub Profile
@ramast
ramast / gist:58633c352ad78e240c2ecc96965d48ed
Last active April 13, 2025 06:59 — forked from TobiasWooldridge/gist:22f0cdca75190b9a473f
How to Unbrick a Kindle Paperwhite

How to unbrick an Amazon Kindle Paperwhite™

This guide instructs you in how to unbrick an Amazon Kindle Paperwhite. The consequences of following it are your own responsibility. This method (opening the Kindle and using the serial interface) should be a last resort and should only be considered if other methods fail

The Guide

  1. Pry open Kindle using a prying tool
  2. Unscrew the screen and remove it from the base. Note that there's a screw hidden under the adhesive at the top in the middle
  3. Solder tin wire to serial ports on the bottom
  4. Attach tin wire to USB TTY device (order is ground, RX, TX, from the kindle's perspective, where GND is the smallest pad) and plug USB TTY device into your computer
  5. Open Putty on your computer in serial mode, with the serial port specified as your USB device and baud configured to 115200
@sindresorhus
sindresorhus / esm-package.md
Last active April 25, 2025 07:50
Pure ESM package

Pure ESM package

The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.

This means you have the following choices:

  1. Use ESM yourself. (preferred)
    Use import foo from 'foo' instead of const foo = require('foo') to import the package. You also need to put "type": "module" in your package.json and more. Follow the below guide.
  2. If the package is used in an async context, you could use await import(…) from CommonJS instead of require(…).
  3. Stay on the existing version of the package until you can move to ESM.
@rajkosto
rajkosto / gist:fbfa22a3c6d6bff7d9ebf92ec8adeb34
Last active April 9, 2025 12:44
Yettel Hipernet ZTE ZXHN H298Q detalji, i tutorial za izvlacenje podataka iz config fajla
ZTE Yettel ruter uspostavlja sledece veze preko svog WAN kabla:
Connection: Management
DHCP IPoE VLAN 715 Priority 0
Vendor class dslforum.org
IP address 10.48.x.x/255.254.0.0
Ovu mrezu koristi da komunicira sa TR069 ACS-om na adresi https://acs.cetin.rs:10302/acs/serbia
Connection: Voice
DHCP IPoE VLAN 711 Priority 5

ChatGPT Telnet

  • Download the files into a directory.
  • Replace the API key with your own in gpt.js
  • Run npm i
  • Run node .
  • Connect to it using telnet
@dmalinovsky
dmalinovsky / 2-logical-page-count.lua
Created April 2, 2024 23:02
Patch for KOReader to build logical page count
local ReaderPageMap = require("apps/reader/modules/readerpagemap")
local postInit_orig = ReaderPageMap._postInit
ReaderPageMap._postInit = function(self)
self.ui.document:buildSyntheticPageMapIfNoneDocumentProvided(1818)
-- Run original code
postInit_orig(self)
end
@notmarek
notmarek / kindle_get_ota.py
Created January 29, 2025 20:51
Simple script to grab latest direct ota url for your kindle
from Crypto.Hash import SHA256
from Crypto.PublicKey import ECC
from Crypto.Signature import DSS
from urllib.parse import urlparse
import re
import json
import requests
import datetime
import base64
import sys