Skip to content

Instantly share code, notes, and snippets.

@TobiasWooldridge
TobiasWooldridge / gist:22f0cdca75190b9a473f
Last active April 26, 2025 22:49
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
@kristopherjohnson
kristopherjohnson / listFiles.swift
Last active November 29, 2023 12:32
Example of using opendir/readdir/closedir with Swift
import Foundation
// Get current working directory
var wdbuf: [Int8] = Array(count: Int(MAXNAMLEN), repeatedValue: 0)
let workingDirectory = getcwd(&wdbuf, UInt(MAXNAMLEN))
println("Working directory: \(String.fromCString(workingDirectory)!)")
println("\nContents:")
// Open the directory
@denji
denji / golang-tls.md
Last active June 28, 2025 04:34 — forked from spikebike/client.go
Simple Golang HTTPS/TLS Examples
Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
@petermorlion
petermorlion / DictionaryJsonConverter
Last active November 12, 2022 16:45
Generic JsonConverter for JSON.NET and IDictionaries
// UPDATE!
// In Json.NET 7, a DictionaryKeyResolver was added.
// This might be able to fix the problem more elegantly.
// I haven't checked though.
public class DictionaryJsonConverter : JsonConverter
{
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
{
var dictionary = (IDictionary)value;
@erichrobinson
erichrobinson / README.md
Last active February 18, 2025 13:43
SwitchResX Configuration

#SwitchResX Settings for LG 21:9 UltraWide

SwitchResX is a utility that allows users to override the default resolution settings in OSX. For more information, including download links, vist http://www.madrau.com/ .

##Disabling System Integrity Protection (SIP)

If you are running OSX 10.11 or higher, SIP must be disabled. To disable SIP do the following:

  • Boot into the recovery partition by pressing CMD + R when starting up your Mac.
  • Once in recovery mode, open a terminal window.
  • Type the command csrutil disable
@nkjzm
nkjzm / RichtextAlphaAdapter.cs
Last active March 20, 2017 03:06
UnityでTextのアルファ値をリッチテキスト使用時にも適用するスクリプト (UniRx使用バージョン)
using UnityEngine;
using UnityEngine.UI;
using UniRx;
using System;
using System.Text.RegularExpressions;
using System.Collections;
public class RichtextAlphaAdapter : MonoBehaviour
{
private Text text;
@nkjzm
nkjzm / RichtextAlphaAdapter.cs
Last active March 15, 2016 20:51
UnityでTextのアルファ値をリッチテキスト使用時にも適用するスクリプト (UniRx未使用バージョン)
using UnityEngine;
using UnityEngine.UI;
using System;
using System.Text.RegularExpressions;
using System.Collections;
public class RichtextAlphaAdapter : MonoBehaviour
{
private Text text;
private Regex regex;
@Jpoliachik
Jpoliachik / index.ios.js
Last active August 17, 2021 10:27
ReactNative LayoutAnimation Example
'use strict';
import React, {
AppRegistry,
Component,
StyleSheet,
Text,
View,
TouchableOpacity,
LayoutAnimation,
} from 'react-native';
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
@JasonKleban
JasonKleban / LiteEvent.ts
Last active November 5, 2024 18:59
TypeScript LiteEvent Events implementation
interface ILiteEvent<T> {
on(handler: { (data?: T): void }) : void;
off(handler: { (data?: T): void }) : void;
}
class LiteEvent<T> implements ILiteEvent<T> {
private handlers: { (data?: T): void; }[] = [];
public on(handler: { (data?: T): void }) : void {
this.handlers.push(handler);