Skip to content

Instantly share code, notes, and snippets.

@chriad
chriad / dl-gist-comment.py
Created September 19, 2021 08:21
download gist comment
from sh import curl
import json
o = curl("https://api.github.com/gists/d14ba9ac49019526e0774b28e2d71b16/comments/3260780",
s=True,
H="Accept: application/vnd.github.v3.raw+json")
f = open("out.md", "w")
f.write(json.loads(o.stdout)["body"])
f.close()
@chriad
chriad / reddit-examples.org
Last active September 11, 2021 17:13
Use cases for reddit downloads and archiving
@chriad
chriad / gist:7cde72293bd39852d8936ac40bec6df5
Created September 2, 2021 19:35
Record a gif from a terminal session
asciinema rec
asciicast2gif /tmp/tmpaeu2t355-ascii.cast demo.gif
required:
apt install asciinema
npm install --global asciicast2gif
apt install gifsicle
@chriad
chriad / foo.org
Last active August 30, 2021 06:48
Download all available episodes of the `Dark Diaries` podcast
@chriad
chriad / gist:48ee0f6cbadc6e8e5e9fcace31a0247e
Created March 30, 2019 19:02
Install adobe acrobat on ubuntu 18.10
sudo dpkg --add-architecture i386
sudo apt update
$ sudo apt install gdebi-core libxml2:i386 libcanberra-gtk-module:i386 gtk2-engines-murrine:i386 libatk-adaptor:i386
$ wget ftp://ftp.adobe.com/pub/adobe/reader/unix/9.x/9.5.5/enu/AdbeRdr9.5.5-1_i386linux_enu.deb
sudo gdebi AdbeRdr9.5.5-1_i386linux_enu.deb
rtmpdump --tcUrl "rtmp://artestras.fcod.llnwd.net/a3903/o35/"
--playpath "mp4:geo/videothek/ALL/tvguide/[...]ide.mp4e=1405940042&h=558769b3279a0bbed9cc9a3f56d4f346"
--app "a3903/o35/"
--rtmp "rtmp://artestras.fcod.llnwd.net/a3903/o35/geo/videothek/ALL/tvguide/043673[...]f56d4f346"
-o rtmp_trial
locate _lldb.so | xargs ls -la
jupyter-nbconvert --to script a-gibbs-sampler-for-detecting-spam.ipynb
@chriad
chriad / Download audio only with youtube-dl
Last active April 19, 2018 08:27
Download audio only with youtube-dl
youtube-dl -F https://www.youtube.com/watch?v=m6p9L3LK_9g
[youtube] m6p9L3LK_9g: Downloading video info webpage
[youtube] m6p9L3LK_9g: Extracting video information
WARNING: unable to extract uploader nickname
[youtube] m6p9L3LK_9g: Downloading MPD manifest
[info] Available formats for m6p9L3LK_9g:
format code extension resolution note
139 m4a audio only DASH audio 49k , m4a_dash container, mp4a.40.5@ 48k (22050Hz), 1.78MiB
249 webm audio only DASH audio 51k , opus @ 50k, 1.79MiB
@chriad
chriad / compress video
Last active April 19, 2018 08:28
compress video
ffmpeg -i input.mp4 -vcodec libx264 -crf 20 output.mp4