Skip to content

Instantly share code, notes, and snippets.

View l13t's full-sized avatar
🦇
Working from home

Dmytro Prokhorenkov l13t

🦇
Working from home
View GitHub Profile
@l13t
l13t / hb_all_books_dl.js
Created May 9, 2018 12:59 — forked from kfatehi/hb_all_books_dl.js
Humble bundle book bundles - download all books at once
/*
After purchasing a humble book bundle, go to your download page for that bundle.
Open a console window for the page and paste in the below javascript
this fork downloads all formats and does so without using jquery (since that didnt work for me)
note that if you are in chrome, chrome will not download the pdfs for you by default, to fix this
type “about:plugins” in the address bar and disable chrome's pdf viewer
*/
var pattern = /(MOBI|EPUB|PDF)$/i;

Keybase proof

I hereby claim:

  • I am l13t on github.
  • I am l13t (https://keybase.io/l13t) on keybase.
  • I have a public key whose fingerprint is C991 4EC2 E2B1 BBBC E46F D00F BF78 F47F 0CF8 E569

To claim this, I am signing this object:

@l13t
l13t / day-mode
Created April 17, 2017 21:40 — forked from Skehmatics/day-mode
#!/bin/bash
# export DBUS_SESSION_BUS_ADDRESS environment variable because cron hates me
PID=$(pgrep -u USER gnome-session-b)
export DBUS_SESSION_BUS_ADDRESS=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$PID/environ|cut -d= -f2-)
/usr/bin/gsettings set org.gnome.shell.extensions.user-theme name 'Flat-Plat'
/usr/bin/gsettings set org.gnome.desktop.interface gtk-theme 'Flat-Plat'
/usr/bin/gsettings set org.gnome.desktop.background picture-uri 'file://WALLPAPER-PATH'
/usr/bin/gsettings --schemadir ~/.local/share/gnome-shell/extensions/[email protected] set org.zzrough.gs-extensions.drop-down-terminal background-color 'rgb(69,90,100)'
@l13t
l13t / recover_source_code.md
Created March 17, 2017 14:52 — forked from simonw/recover_source_code.md
How to recover lost Python source code if it's still resident in-memory

How to recover lost Python source code if it's still resident in-memory

I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6

Attach a shell to the docker container

Install GDB (needed by pyrasite)

apt-get update && apt-get install gdb