Skip to content

Instantly share code, notes, and snippets.

View shamanNS's full-sized avatar

Predrag Đokić shamanNS

View GitHub Profile
@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
@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

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
@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
@sindresorhus
sindresorhus / esm-package.md
Last active April 24, 2025 06:11
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.
@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
@ruario
ruario / 1-README.md
Last active August 8, 2024 12:41
A script that fetches a ChromeOS image for ARM32 and extracts the Widevine binary, saving it in a compressed archive for use with Vivaldi

The included script 'widevine-flash_armhf.sh' fetches a ChromeOS image for ARM and extracts the Widevine binary, saving it in a compressed archive. Since it downloads a fairly large file (2Gb+ on disk after download) it is recommended that you run the script on a machine that has plenty of disk space.

To install the resultant archive, issue the following on your ARM machine–after copying over the archive if needed:

sudo tar Cfx / widevine-flash-20200124_armhf.tgz

(Where 'widevine-flash-20200124_armhf.tgz' is updated to reflect the actual name of the created archive)

@rainabba
rainabba / config-docker.sh
Last active September 6, 2022 03:46
Install docker-ce, docker-compose and docker-sync in Ubuntu for WSL
#!/bin/bash
#
#This script assumes very little other than a fresh Ubuntu install (using the Windows store) on Win10 1709 or newer with WSL installed already
#In Powershell, run the following to install WSL and Ubuntu
#
#Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
#Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1604 -OutFile ~/Ubuntu.zip -UseBasicParsing
#Expand-Archive ~/Ubuntu.zip ~/Ubuntu
#~/Ubuntu/ubuntu.exe
#
@enzanki-ars
enzanki-ars / update-ffmpeg-rpi.sh
Last active December 4, 2023 21:36
Install/Update FFmpeg with hardware acceleration on the Raspberry Pi
#!/bin/bash
# #########################################################
#
# WW WW AAA RRRRRR NN NN IIIII NN NN GGGG
# WW WW AAAAA RR RR NNN NN III NNN NN GG GG
# WW W WW AA AA RRRRRR NN N NN III NN N NN GG
# WW WWW WW AAAAAAA RR RR NN NNN III NN NNN GG GG
# WW WW AA AA RR RR NN NN IIIII NN NN GGGGGG
#
@ruario
ruario / intro-latest-widevine.md
Last active January 29, 2024 07:53
Fetches the latest Linux Widevine binary so that it can be used by Vivaldi.

With the release of Vivaldi 2.2, this page is now obsolete and unmaintained. Widevine is fetched automatically on post install of our official packages. The information below and the script are left for historical reasons but will not be updated.

If you are using something newer than Vivaldi 2.2, you should not be using this script as there is simply no need. Any need you think you have for it would be a bug IMHO and thus should be logged in a bug report. Before you do so however, you should also checkout the Vivaldi help page on Widevine, on Linux


Summary

A bunch of people asked how they could use this script with pure Chromium on Ubuntu. The following is a quick guide. Though I still suggest you at least try Vivaldi. Who knows, you might like it. Worried about proprietary componants? Remember that libwidevinecdm.so is a b