Skip to content

Instantly share code, notes, and snippets.

@nestukh
nestukh / README.md
Last active August 29, 2015 14:23 — forked from rvagg/README.md

Work in progress, I'll write this up properly when I'm done.

Almost all credit goes to @maxogden for putting me on to this and pointing me in the right direction for each of these items.

Prerequisites:

  • Raspberry Pi
  • Kindle Paperwhite freed from its locked down state (jailbroken) http://www.mobileread.com/forums/showthread.php?t=198446
    • You have to downgrade your Kindle to 5.3.1 to install the current jailbreak; that's just a matter of getting the old version image, putting it on your Kindle via USB and telling it to install "upgrade". Then you put in the Jailbreak files, load the ebook and break.
  • Your kindle will be quick to detect an upgrade is available so it'll want to upgrade soon afterwards but the jailbreak will last but you have to reinstall the developer certificates so it's a bit of a pain but doable. Find all the instructions on the mobileread.com forums and wiki.
@nestukh
nestukh / README.md
Last active August 29, 2015 14:23 — forked from jaigouk/README.md

Work in progress, I'll write this up properly when I'm done.

Almost all credit goes to @maxogden for putting me on to this and pointing me in the right direction for each of these items.

Prerequisites:

  • Raspberry Pi
  • Kindle Paperwhite freed from its locked down state (jailbroken) http://www.mobileread.com/forums/showthread.php?t=198446
    • You have to downgrade your Kindle to 5.3.1 to install the current jailbreak; that's just a matter of getting the old version image, putting it on your Kindle via USB and telling it to install "upgrade". Then you put in the Jailbreak files, load the ebook and break.
  • Your kindle will be quick to detect an upgrade is available so it'll want to upgrade soon afterwards but the jailbreak will last but you have to reinstall the developer certificates so it's a bit of a pain but doable. Find all the instructions on the mobileread.com forums and wiki.
@nestukh
nestukh / zsh-bootstrap
Created September 24, 2015 15:06 — forked from organman91/zsh-bootstrap
Boostrapping zsh from bash
If you're in an environment where your login shell isn't changeable (perhaps an educational institution)
but you still have the option to use zsh, you might want to have it log in to zsh automatically.
Some clever .bashrc will take care of that in a jiffy.
Put the following at the bottom of your .bashrc:
-----
# Start ssh-agent
# If (like me) you've got an NFS-mounted home directory,
# you might only want to start ssh-agent from the first machine you log in to.
#!/bin/bash
## insert in crontab with
## crontab -e
# 1 * * * * bash /home/USER/manga_checker.sh # every minute 1 of every hour of any day
## rememeber to chmod +x manga_checker.sh
# # # # ### on raspberry pi
# # # #
# # # # usermod -a -G sudo,crontab,ssh $USER #### reboot for change to take effect
@nestukh
nestukh / installheadlessfirefoxonpi.sh
Last active February 24, 2024 02:38
Install firefox-esr + geckodriver + selenium + python3 on raspberry pi 3 and above
#!/bin/bash
pypcks="python3-pip python3 python3-all-dev python3-dev libffi-dev libssl-dev librtmp-dev python-dev python3 python3-doc python3-tk python3-setuptools tix xvfb python-bluez python-gobject python-dbus python cython python-doc python-tk python-numpy python-scipy python-qt4 python3-pyqt5 python3-pyqt5.q* python3-qtpy python-pyqt5.q* python-lxml fontconfig python-demjson qt5-default libqt5webkit5-dev build-essential libudev-dev python-lxml libxml2-dev libxslt-dev libpq-dev python-pyside python-distlib python-pip python-setuptools" # python-examples python3-examples python-vte
allgoodpcks="ca-certificates virtualenv autotools-dev cdbs git expect libnss3-tools util-linux xvfb curl bridge-utils chromium-browser chromium-chromedriver firefox-esr"
sudo apt-get install --reinstall -y $pypcks $allgoodpcks
if [[ ! -f /usr/lib/chromium-browser/chromedriver ]]; then
sudo ln -s /usr/bin/chromedriver /usr/lib/chromium-browser/chromedriver
fi
@nestukh
nestukh / gist:29ddd4e55f63bcb207e8f158d41a69d3
Created November 17, 2021 10:25
logs of "OPENSC_DEBUG=3 $HOME/.bin/TS-CNS/static/bin/pkcs11-tool --login --test --module /home/$USER/.bin/TS-CNS/static/lib/opensc-pkcs11.so"
P:90108; T:0x139944898844736 10:32:10.179 [opensc-pkcs11] ctx.c:722:process_config_file: Used configuration file '/home/$USER/.bin/TS-CNS/static/etc/opensc.conf'
P:90108; T:0x139944898844736 10:32:10.179 [opensc-pkcs11] ctx.c:853:sc_context_create: ===================================
P:90108; T:0x139944898844736 10:32:10.179 [opensc-pkcs11] ctx.c:854:sc_context_create: opensc version: 0.22.0
P:90108; T:0x139944898844736 10:32:10.179 [opensc-pkcs11] reader-pcsc.c:888:pcsc_init: PC/SC options: connect_exclusive=0 disconnect_action=0 transaction_end_action=0 reconnect_action=0 enable_pinpad=1 enable_pace=1
P:90108; T:0x139944898844736 10:32:10.180 [opensc-pkcs11] reader-pcsc.c:1388:pcsc_detect_readers: called
P:90108; T:0x139944898844736 10:32:10.180 [opensc-pkcs11] reader-pcsc.c:1401:pcsc_detect_readers: Probing PC/SC readers
P:90108; T:0x139944898844736 10:32:10.180 [opensc-pkcs11] reader-pcsc.c:1454:pcsc_detect_readers: Establish PC/SC context
P:90108; T:0x139944898844736 10:32:10.180 [opensc-pkcs11] reader-p