Skip to content

Instantly share code, notes, and snippets.

@michaelmakun
michaelmakun / Personal Library.md
Created February 8, 2020 03:15 — forked from xiaolai/Personal Library.md
My own library
  1. Download and pin books at https://read.amazon.com, and use epubor KCR converter to convert them into epubs.
  2. Download audio books at https://audible.com, with aax format.
  3. Obtain your activation bytes with the instruction of this post.
  4. Install ffmpeg with brew.
  5. Install audible-converter with npm. (File name will be extended automatically)
audible-converter "*.aax" -a <your-activation-bytes>
  1. Install atomicparsley with brew. (to add artwork to converted m4a files) Bash script to add artworks to m4a files:
@michaelmakun
michaelmakun / sort.rb
Last active October 3, 2017 10:29
binary_search and find_index
require 'benchmark'
def binary_search(arr,element)
l = 0
r = arr.length - 1
while l <= r
mid = l + ((r-l)/2)
if arr[mid] == element
return mid