Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@PandaSekh
PandaSekh / react-intersperse-ts.tsx
Created May 6, 2021 09:37
ReactJS Intersperse with Typescript
/*
* intersperse: Return an array with the separator interspersed between
* each element of the input array.
*
* https://stackoverflow.com/questions/23618744/rendering-comma-separated-list-of-links
*
* > _([1,2,3]).intersperse(0)
* [1,0,2,0,3]
*
* This version is done in Typescript and supports React Elements.
@PandaSekh
PandaSekh / PDFtoCBR.py
Last active November 14, 2020 17:41
Convert PDFs to CBR.
# Simple python script to bulk convert PDFs to CBR. Download the .py file and copy it into a folder with the PDFs you want to convert.
# The script won't look for PDFs into subdirectories, but only into the current dir. Open the terminal and run the script.
# No configuration needed. The script will also convert all CBZ to CBR for consistency.
# ImageMagick needs to be installed.
import fnmatch
import os
import shutil
import subprocess
import sys

Keybase proof

I hereby claim:

  • I am pandasekh on github.
  • I am pandasekh (https://keybase.io/pandasekh) on keybase.
  • I have a public key whose fingerprint is C6D6 D0BA 78AF EC0E 138F 9F81 A990 816F C7F8 FCD5

To claim this, I am signing this object: