Skip to content

Instantly share code, notes, and snippets.

@thfrei
thfrei / launch.json
Last active August 10, 2020 21:07
trilium vscode node chrome debug launch.json for vscode
{
"version": "0.2.0",
"configurations": [
{
"name": "trilium dev",
"program": "${workspaceFolder}/src/www",
"request": "launch",
"runtimeArgs": ["--inspect","--inspect-port=9229"],
"env": {
"TRILIUM_ENV": "dev",
@thfrei
thfrei / suby.subx.domain.tld
Created September 8, 2020 14:55
NGINX /etc/nginx/sites-available
# reverse proxy basic config
# Note 1: after creating this file in /etc/nginx/sites-available link it into sites-enabled:
# `sudo ln -s /etc/nginx/sites-available/suby.subx.dmain.tld /etc/nginx/sites-enabled/suby.subx.dmain.tld
# Note 2: after changing nginx, make sure to reload nginx config via: `sudo nginx -s reload`
# Note 3: add the new site to certbot via:
# `sudo certbot --nginx -d apps.fr31.net -d NEWAPP.server.apps.f
r31.net --register-unsafely-without-email`
upstream NEWAPP { # <----- change this line
server 127.0.0.1:33XYZ; # <----- change this line
@thfrei
thfrei / npm-scripts-for-docker.md
Created October 28, 2020 10:57 — forked from duluca/npm-scripts-for-docker.md
npm scripts for Docker

These are generic npm scripts that you can copy & paste into your package.json file as-is and get access to convinience scripts to manage your Docker images all in one place.

How to Use

npm i -g mrm-task-npm-docker
npx mrm npm-docker

Contribute

Here's the code repository https://github.com/expertly-simple/mrm-task-npm-docker

@thfrei
thfrei / noexport-subtrees.lua
Created October 4, 2021 09:55 — forked from tarleb/noexport-subtrees.lua
Emulating org-mode's :noexport: behavior for Markdown.
-- [[
Remove all subtrees whose headlines contain class `noexport`.
License: MIT
Copyright: © Albert Krewinkel
]]
-- pandoc.utils.make_sections exists since pandoc 2.8
PANDOC_VERSION:must_be_at_least {2,8}
@thfrei
thfrei / youtubemusicdownloader.py
Created October 19, 2023 11:29 — forked from un1tz3r0/youtubemusicdownloader.py
This script uses ytmusicapi and pytube together to download your playlists, history or 'liked' songs as high-quality audio-only streams from Youtube Music.
''' This script uses ytmusicapi and pytube together to download your playlists, history or 'liked' songs as
high-quality audio-only streams from Youtube Music, which are protected by a "signatureCipher" obfuscation scheme.
To use it, first install [ytmusicapi] and [pytube] using pip, then follow the instructions for creating the auth
file from the response in an authenticated session to a watch-page request as found in your browser's dev-tools.
The downloaded files are placed in ~/Music, named with the artist and track metadata, and will be skipped instead
of downloaded again next time it is run, based on the videoIds of the downloaded songs.
Merry Xmas - V.