Skip to content

Instantly share code, notes, and snippets.

# to be executed on the device itself
# note that ~/xochitl-data is a symlink to avoid long path
quickNotesLayersToWiki(){ cd xochitl-data; curl -d "?n=PIMVRdata.ReMarkableQuicknotes&text=$(grep name UUID/*json | sed 's/.*: "\(.*\)"/%0a* \1/' | tr '\n' ' ')&action=edit&post=1&author=reMarkable2Ttest&authpw=edit_pw_to_change" https://fabien.benetou.fr/PIMVRdata/ReMarkableQuicknotes; cd -; }
# note that you must replace UUID and edit_pw by the UUID of your quicknote document (you can use hashFromTitle() for that) and your PmWiki password respectively.
qrCodeLink () { qrencode http://`ip a | grep wlan0$ | sed "s/.* \(.*\)\/.*/\1/"`:3000/data/$1.pdf -o qr_ip.xpm -t XPM && convert qr_ip.xpm qr_ip.pdf && addPdfWithMetadata qr_ip.pdf; }
hashFromTitle () { cd ~/.local/share/remarkable/xochitl/ && grep -l -i $1 *metadata | sed 's/.metadata//'; }
addPdfWithMetadata(){
cp $1 ~/xochitl-data && echo "{'parent':'','type':'DocumentType','visibleName':'$1'}" | sed s/\'/\"/g > ~/xochitl-data/`echo $1 | sed "s/.pdf//"`.met
@laranea
laranea / FFmpeg | Basic Operation on Subtitles.md
Created January 24, 2021 13:10 — forked from innat/FFmpeg | Basic Operation on Subtitles.md
Remove hard subtitles from video file || Integrate subtitles into a video file || Generate .srt file from a video file.

Download FFmpeg for Windows

Steps

  • Download FFmpeg
  • Extract it and save it to C drive ( choose any location - it's optional )
  • Set environment variable - copy the location of bin folder which is inside the extracted file and set the location on system path variable.
  • Done!
@laranea
laranea / list.md
Created December 10, 2020 23:18 — forked from ih2502mk/list.md
Quantopian Lectures Saved
http://www.oreilly.com/data/free/files/2014-data-science-salary-survey.pdf
http://www.oreilly.com/data/free/files/2015-data-science-salary-survey.pdf
http://www.oreilly.com/data/free/files/Data_Analytics_in_Sports.pdf
http://www.oreilly.com/data/free/files/advancing-procurement-analytics.pdf
http://www.oreilly.com/data/free/files/ai-and-medicine.pdf
http://www.oreilly.com/data/free/files/analyzing-data-in-the-internet-of-things.pdf
http://www.oreilly.com/data/free/files/analyzing-the-analyzers.pdf
http://www.oreilly.com/data/free/files/architecting-data-lakes.pdf
http://www.oreilly.com/data/free/files/being-a-data-skeptic.pdf
http://www.oreilly.com/data/free/files/big-data-analytics-emerging-architecture.pdf
http://www.oreilly.com/data/free/files/2014-data-science-salary-survey.pdf
http://www.oreilly.com/data/free/files/2015-data-science-salary-survey.pdf
http://www.oreilly.com/data/free/files/Data_Analytics_in_Sports.pdf
http://www.oreilly.com/data/free/files/advancing-procurement-analytics.pdf
http://www.oreilly.com/data/free/files/ai-and-medicine.pdf
http://www.oreilly.com/data/free/files/analyzing-data-in-the-internet-of-things.pdf
http://www.oreilly.com/data/free/files/analyzing-the-analyzers.pdf
http://www.oreilly.com/data/free/files/architecting-data-lakes.pdf
http://www.oreilly.com/data/free/files/being-a-data-skeptic.pdf
http://www.oreilly.com/data/free/files/big-data-analytics-emerging-architecture.pdf
@laranea
laranea / thestoryofus.sh
Created August 7, 2020 22:48 — forked from dirkjanfaber/thestoryofus.sh
Download the story of us as epub (waitbutwhy)
#/bin/bash
dir=$(mktemp --directory)
declare -a input=()
cat <<__EOT__ > ${dir}/metadata.txt
---
title: The Story of Us
author: Tim Urban
rights: Creative Commons Non-Commercial Share Alike 3.0
@laranea
laranea / imap_monitor
Created July 14, 2020 14:59 — forked from shimofuri/imap_monitor
Python script for monitoring an IMAP folder
Each existing unread and subsequent new emails after the script is started are
passed as Mail objects to "process_email" function.Function header is provided
but processing implementation is left to the user. Error logs are currently sent
to a rotating log file (in the same directory as the script) and to STDOUT.
Instead of polling or checking the server for new emails every now and then,
IMAP IDLE check is utilized. Ensure that the IMAP server supports IDLE command
and allows at least 5 minutes of idling*** and uses the default ports for this
script to work. Tested to work with Gmail and default installations of MS
Exchange Server.
@laranea
laranea / mt940toOFX.py
Created July 14, 2020 13:42 — forked from mdornseif/mt940toOFX.py
Convert SWIFT MT940 data to OFX.
#!/usr/bin/env python
# encoding: utf-8
"""
mt940toOFX.py - Dieses Progrtamm liesst MT940 SWIFT Kontostände und konvertiert sie in OFX.
OFX wurde mit xero.com getestet.
Created by Maximillian Dornseif on 2010-06-05.
Copyright (c) 2010, 2013, 2014 HUDORA. All rights reserved.
"""
@laranea
laranea / PimpMyStremio-on-Android.md
Created May 14, 2020 00:50 — forked from sleeyax/PimpMyStremio-on-Android.md
PimpMyStremio on Android guide

PimpMyStremio on android

This guide teaches you how to install PimpMystremio on your android device. Please keep in mind that this is just an expirement. I strongly recommend to use PMS on your computer when possible.

You do not need root access or a high end phone to follow this guide. The only thing you need is +-2.5GB of free storage and a basic understanding of linux.

Installation

Preparation

First of all, go to the playstore and install termux (?). Temux is a terminal emulator that allows you to run basic linux commands on your android device. We will use this to install a Ubuntu chroot/proot container that will run PMS.

Secondly, go get the Hacker's Keyboard. It makes typing and navigation on termux way easier.

@laranea
laranea / README.md
Created April 26, 2020 15:44 — forked from ryansb/README.md
SQLAlchemy/JSON Notebook - requires Python 3, SQLAlchemy, psycopg2, and Jupyter (formerly IPython Notebook)

Before running this notebook, run:

pip3 install jupyter SQLAlchemy psycopg2

This will install the notebook server and database drivers needed to run these examples. For more information on installing Jupyter (formerly IPython notebook) see their install guide.

Once you've installed the dependencies, run jupyter notebook and it will open your web browser to the notebook's main page. Then upload this notebook (SQLTest.ipynb) and run it.