Skip to content

Instantly share code, notes, and snippets.

@adithyabsk
adithyabsk / README.md
Last active December 30, 2023 06:15
Convert iBook EPUBs to standard EPUBs

How to Convert iBook EPUBs to standard EPUBs

iBooks EPUBs actually show up on macOS as folders. If you need the actual file you can use the above script to convert your iBook directory of files to a destination directory.

The path of iBook files as of macOS 10.15.7 is: /Users/${USER}/Library/Mobile Documents/iCloud~com~apple~iBooks/Documents

Usage

@adithyabsk
adithyabsk / shell_dump.md
Created July 6, 2022 19:01
Working Pyenv / Poetry Setup Example
pwd
/Users/adithyabalaji/Coding/test
❯ ls
❯ pyenv --version
pyenv 2.3.2
❯ poetry --version
Poetry version 1.1.13
❯ pyenv global
3.8.10
@adithyabsk
adithyabsk / set_up_virtualenv.sh
Last active July 5, 2022 13:08
Set up virtualenv
cd simplecalc
pyenv virtualenv 3.6.8 simplecalc
pyenv local simplecalc 3.6.8 3.7.3
# pyenv virtualenv [VERSION] [NAME]
# pyenv local [VERSION...]
# Note that you can use your venv in place of a "version"
@adithyabsk
adithyabsk / parachute.py
Last active May 24, 2021 04:24
NASA Perseverance Parachute Code
"""Perseverence Parachute Cipher Python Solution
In Press:
* https://www.nytimes.com/2021/02/24/science/nasa-mars-parachute-code.html
* https://www.theguardian.com/science/2021/feb/23/dare-mighty-things-hidden-message-found-on-nasa-mars-rover-parachute
* https://www.cmu.edu/news/stories/archives/2021/march/mars-rover-code.html
Output:
DARE¿¿¿¿
MIGHTY¿¿
THINGS¿¿
@adithyabsk
adithyabsk / HNDark.css
Created September 23, 2020 06:32
A modified version of a HN Dark Theme that works with refined-hacker-news
/* Placeholder: /*[[upvotecolor]]*/
/* Replace with #6F6F6F for gray upvote arrow. */
/* Replace with #FF6600 for orange upvote arrow. */
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("news.ycombinator.com") {
/* main body styles */
body {
background-color: #262626;
}
@adithyabsk
adithyabsk / pyproject.toml
Created November 3, 2020 10:54
Sample pyproject.toml
[tool.poetry]
name = "test"
version = "0.1.0"
description = ""
authors = ["First Last"]
[tool.poetry.dependencies]
python = "^3.9"
[build-system]
@adithyabsk
adithyabsk / keybase.md
Created October 28, 2020 05:47
keybase.md

Keybase proof

I hereby claim:

  • I am adithyabsk on github.
  • I am abalaji (https://keybase.io/abalaji) on keybase.
  • I have a public key ASDagzA4vgI2kuB6xpf0pgfCrwn8xH8Q6Lqn5_iyFrJMMQo

To claim this, I am signing this object:

@adithyabsk
adithyabsk / install.sh
Last active May 19, 2020 23:09
All installation steps compiled
curl https://pyenv.run | bash
pyenv install 3.6.8
pyenv install 3.7.3
pyenv global 3.6.8
pyenv shell system
curl -sSL https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py | python
pyenv shell --unset
git clone -b tool_usage_example https://github.com/adithyabsk/simplecalc.git
cd simplecalc
pyenv virtualenv simplecalc
@adithyabsk
adithyabsk / populatedb_data_broken.json
Created February 24, 2020 14:04
Broken populatedb_data.json
[
{
"model": "product.category",
"pk": 7,
"fields": {
"private_metadata": {},
"metadata": {},
"seo_title": "",
"seo_description": "",
"name": "Accessories",
@adithyabsk
adithyabsk / build_pyproject.sh
Created July 30, 2019 21:49
Building the pyproject.toml file
poetry add click
poetry add toml
poetry add sphinx --optional
poetry add sphinx_rtd_theme --optional
poetry add flake8 -D
poetry add xdoctest -D
poetry add flake8-docstrings -D
poetry add pydocstyle -D
poetry add black -D --allow-prereleases