Skip to content

Instantly share code, notes, and snippets.

@myyc
myyc / how_to_crack_ebooks.md
Last active May 14, 2024 02:33
How to crack ebooks

How to crack ebooks on Linux

If you made the mistake of buying Kindle ebooks and you don't have an iPad or a Kindle to read them on, or if you decided to buy ebooks off a third party reseller and realised they aren't epubs but some bullshit "Adobe DRM" file, this guide is for you.

Adobe DRM

If you have an (unopened) Adobe DRM ebook, forget DeDRM and similar tools,

@myyc
myyc / win_gog_arch_linux.md
Last active April 29, 2024 13:50
Manually install recent Windows GOG games on Arch Linux

If you're gaming on Linux you should probably use Steam. This is pathetic as GOG's initial selling point was "fuck DRM" and all that, but nowadays probably because of the Steam Deck Steam's Windows launcher on Linux is just seamless.

If you made the mistake of buying Windows games on GOG because you thought no DRM was a good idea, well, this guide is for you.

First things first, the setup

  • Recent hardware. Good CPU and recent-enough GPU (I have a Nvidia 3060 Ti).
@myyc
myyc / arch_linux_install_guide.md
Last active May 30, 2024 23:58
Arch Linux setup with all the good stuff (Plymouth, encryption, systemd-boot etc.)

Hope this will stay relevant for longer than just 2021. This guide will focus mostly on things you shouldn't overlook and will harshly prioritise assuming that you're running on recent hardware. EFI and all that.

Always refer to the official guide in case of doubt.

First things first

One important thing first: the environment you will encounter on the live image is very different from what you'll end up installing, some things are significantly easier there: e.g. wifi tools come pre-installed, the default shell is a pimped zsh with nice completions, and so on. We'll keep this

@myyc
myyc / esp32_telegram_hi.ino
Last active January 20, 2021 09:39
esp32_telegram_hi
/*
* "params.h"
* const char* ssid = "your SSID";
* const char* password = "wpa password";
* const String token = "telegram_bot_token";
* const String to_id = "numeric telegram id of the recipient";
*/
#include "params.h"
#include <WiFi.h>
@myyc
myyc / genpasswd.py
Last active April 9, 2019 15:52
a password generator
#!/usr/bin/env python3
import random
def genpasswd() -> str:
nc = random.randint(36, 48)
rc = []
for l in ([chr(65+i) for i in range(26)], # uppercase
[chr(97+i) for i in range(26)], # lowercase
@myyc
myyc / ucldraw.py
Last active December 8, 2017 13:14
chelsea is 66.667% fucked
import pandas as pd
import numpy as np
import seaborn as sns
from ipywidgets import interact, RadioButtons as RB
fs = [("Barcelona", "ESP","D"), ("Beşiktaş", "TUR","G"),
("Liverpool", "ENG","E"),
("City", "ENG","F"), ("Man U", "ENG","A"),
("PSG","FRA","B"), ("Roma", "ITA","C"),
("Tottenham", "ENG","H")]
@myyc
myyc / f.py
Created November 1, 2016 14:56
from functools import wraps
def c(f):
@wraps(f)
def w(k):
if k in d:
return d[k]
else:
d[k] = f(k)
return d[k]
@import url("base.css"); /* Happy16 Light theme */
body {background-color: #f9f9f9;}
.container { min-width:60% !important; }
.output_svg div {
width: 100% !important;
height: 100% !important;
}
#!/usr/bin/env zsh
log=/tmp/pybs.log
pip=/opt/local/bin/pip3.6
pkgs=("pip" "numpy" "scipy" "pandas" "matplotlib" "seaborn")
autoload -Uz colors && colors
function y() {
echo "[$fg[$1]$2$reset_color]\t"
#!/usr/bin/env python
from __future__ import print_function
import sys
import platform
import os.path
import os
import subprocess
from distutils import spawn