Skip to content

Instantly share code, notes, and snippets.

View santatic's full-sized avatar
🐢
Working from home

Santatic santatic

🐢
Working from home
View GitHub Profile

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

Prerequisite

Hardware

  • Prying tool
  • Screw driver
  • USB to serial cable (1.8V the best, other not tried and may fried your kindle)
  • USB to micro USB cable

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
@santatic
santatic / gist:a0d3f9b91b634df1cb931bb67a068895
Created February 2, 2024 06:48 — 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
@santatic
santatic / keychron_linux.md
Created July 23, 2023 10:16 — forked from andrebrait/keychron_linux.md
Keychron keyboards on Linux + Bluetooth fixes

Here is the best setup (I think so :D) for K-series Keychron keyboards on Linux.

Most of these commands have been tested on Ubuntu 20.04 and should also work on most Debian-based distributions. If a command happens not to work for you, take a look in the comment section.

Make Fn + F-keys work

Keychron Keyboards on Linux use the hid_apple driver (even in Windows/Android mode), both in Bluetooth and Wired modes. By default, this driver uses the F-keys as multimedia shortcuts and you have to press Fn + the key to get the usual F1 through F12 keys.

import backtrader as bt
import pandas as pd
import numpy as np
class PivotPointLine(bt.Indicator):
lines = ('pivot_up', 'pivot_down', 'pl_value', 'direction',)
params = (
('pivot_window_len', 12),
('history_bars_as_multiple_pwl', 30)
def show_worst_drawdown_periods(returns, top=5):
"""
Prints information about the worst drawdown periods.
Prints peak dates, valley dates, recovery dates, and net
drawdowns.
Parameters
----------
returns : pd.Series
@santatic
santatic / 0TrySome4kVideoModes.sh
Created March 27, 2021 11:48 — forked from aacero/0TrySome4kVideoModes.sh
How I got 4K video resolution working with an older Intel graphics chipset (Ubuntu 20.04, Samsung U32R59x)
#!/bin/bash
# cvt 2560 1440 30
# xrandr --newmode "2560x1440_30.00" 146.25 2560 2680 2944 3328 1440 1443 1448 1468 -hsync +vsync
# xrandr --addmode HDMI-1 2560x1440_30.00
# xrandr --output HDMI-1 --mode 2560x1440_30.00
# This one is easier on the eyes than 3840x2160 @24Hz:
# cvt -r 2560 1440 60
# 2560x1440 59.95 Hz (CVT 3.69M9-R) hsync: 88.79 kHz; pclk: 241.50 MHz
@santatic
santatic / cache.js
Created January 24, 2021 12:08 — forked from bshamric/cache.js
I like phantomjs, but it doesn't directly support getting images from webpages without requesting them separately like in casperjs. I went through QTNetworking code in the phantomjs repo until I figured out where the cache was. To use this, have all three files in the same directory. Then modify test.js for whatever you need. Call phantom js wit…
var fs = require('fs');
//this is the path that QTNetwork classes uses for caching files for it's http client
//the path should be the one that has 16 folders labeled 0,1,2,3,...,F
exports.cachePath = '/path/to/phantomjs/cache/data/folder';
//this is the extension used for files in the cache path
exports.cacheExtension = "d";
//the resources that are to be saved
INPUT:
MAXFLDUR(15), //Max Flag Duration
FLAGMIN(2.5), // Max Atr in lowest point in flag
PX(23), //Max Pole Duration.
UPT1BARS(70), // Bars for Uptrend leading to flag
POLEMIN(5.5), //Min ATR Height of the pole
LBF(50), // Min distance between flags
ATRmin(5),// Min volatility change
K(1.2), //Profit Target constant
timeexit(100), //Time exit bars