Skip to content

Instantly share code, notes, and snippets.

@pukkandan
pukkandan / ytdlp_nest_comments.py
Last active April 18, 2024 01:12
Prettify and nest comments from yt-dlp's info.json file and write it to a new html/json file
#!/usr/bin/env python3
"""
SPDX-License-Identifier: MIT https://opensource.org/licenses/MIT
Copyright © 2021 pukkandan.ytdlp@gmail.com
* Input file is an info.json (with comments) that yt-dlp (https://github.com/yt-dlp/yt-dlp) wrote
* Change FIELDS according to your needs

Let's say you want to run Emacs for Linux under Windows Subsystem for Linux. The following is what I have been trying, for about 48 hours as I write this. So, take this with a grain of salt. It is not meant to be a polished or comprehensive tutorial.

Do a vanilla WSL install

  • Install Windows Subsystem for Linux itself.

  • Install a distro from the Microsoft store, e.g. Ubuntu.

@satish-setty
satish-setty / trial.md
Last active April 29, 2024 09:48 — forked from huqi/trial.key
Beyond Compare 4 license for Linux

Beyond Compare 4.x

Licensed to: ASIO Allsoftinone Quantity: 1 user Serial number: 1822-9597 License type: Pro Edition for Linux

First delete away trial mode:

sudo sed -i "s/keexjEP3t4Mue23hrnuPtY4TdcsqNiJL-5174TsUdLmJSIXKfG2NGPwBL6vnRPddT7tH29qpkneX63DO9ECSPE9rzY1zhThHERg8lHM9IBFT+rVuiY823aQJuqzxCKIE1bcDqM4wgW01FH6oCBP1G4ub01xmb4BGSUG6ZrjxWHJyNLyIlGvOhoY2HAYzEtzYGwxFZn2JZ66o4RONkXjX0DF9EzsdUef3UAS+JQ+fCYReLawdjEe6tXCv88GKaaPKWxCeaUL9PejICQgRQOLGOZtZQkLgAelrOtehxz5ANOOqCaJgy2mJLQVLM5SJ9Dli909c5ybvEhVmIC0dc9dWH+/N9KmiLVlKMU7RJqnE+WXEEPI1SgglmfmLc1yVH7dqBb9ehOoKG9UE+HAE1YvH1XX2XVGeEqYUY-Tsk7YBTz0WpSpoYyPgx6Iki5KLtQ5G-aKP9eysnkuOAkrvHU8bLbGtZteGwJarev03PhfCioJL4OSqsmQGEvDbHFEbNl1qJtdwEriR+VNZts9vNNLk7UGfeNwIiqpxjk4Mn09nmSd8FhM4ifvcaIbNCRoMPGl6KU12iseSe+w+1kFsLhX+OhQM8WXcWV10cGqBzQE9OqOLUcg9n0krrR3KrohstS9smTwEx9olyLYppvC0p5i7dAx2deWvM1ZxKNs0BvcXGukR+/g" /usr/lib/beyondcompare/BCompare
@RickCogley
RickCogley / create-github-issue.sh
Last active October 12, 2023 20:57
Curl Script to Create a Github Issue
curl -X "POST" "https://api.github.com/repos/rickcogley/REPONAME/issues?state=all" \
-H "Cookie: logged_in=no" \
-H "Authorization: token THEd13GITHUBfb87TOKENa4FROM5eSETTINGS" \
-H "Content-Type: text/plain; charset=utf-8" \
-d $'{
"title": "A workflow alerts Operator who performs a process",
"body": "TBD",
"milestone": 5,
"assignees": [
"RickCogley",
@mkgilbert
mkgilbert / README.md
Last active March 4, 2020 11:24
vagrant centos-6 with slurm and python3 custom box setup

instructions to create custom vagrant box on windows host OS

PREREQS:

- update windows powershell to at least version 3 (run $PSVersionTable to find version from powershell)
- Make sure you have sharing enabled
	- advanced sharing settings: 
		1. turn on network discovery
		2. enable file and printer sharing
		3. use user accounts and passwords to connect to other computers
- install virtualbox
@application2000
application2000 / how-to-install-latest-gcc-on-ubuntu-lts.txt
Last active February 21, 2024 03:02
How to install latest gcc on Ubuntu LTS (12.04, 14.04, 16.04)
These commands are based on a askubuntu answer http://askubuntu.com/a/581497
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below.
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING.
ABSOLUTELY NO WARRANTY.
If you are still reading let's carry on with the code.
sudo apt-get update && \
sudo apt-get install build-essential software-properties-common -y && \
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
@lmullen
lmullen / Makefile
Last active February 25, 2023 21:14
PDF slides and handouts using Pandoc and Beamer
SLIDES := $(patsubst %.md,%.md.slides.pdf,$(wildcard *.md))
HANDOUTS := $(patsubst %.md,%.md.handout.pdf,$(wildcard *.md))
all : $(SLIDES) $(HANDOUTS)
%.md.slides.pdf : %.md
pandoc $^ -t beamer --slide-level 2 -o $@
%.md.handout.pdf : %.md
pandoc $^ -t beamer --slide-level 2 -V handout -o $@
@wcaleb
wcaleb / getbibs.py
Last active April 4, 2022 15:36
The Pandoc filter and shell script I use to make a bibliography file from my BibTeX note files. See http://wcm1.web.rice.edu/plain-text-citations.html
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Pandoc filter that grabs the BibTeX code block from each note file
# and then uses bibtexparser to add a "short title" entry in the "note" field,
# appending finished BibTeX entry to a bibliography file.
from pandocfilters import toJSONFilter, CodeBlock
# https://github.com/sciunto/python-bibtexparser
import bibtexparser
@kirelagin
kirelagin / hw.latex
Last active February 26, 2023 18:48
Homework template for pandoc
%%%
%
% Homework template for pandoc
%
% You'll need XeLaTeX.
% You'll need PT fonts (or change them).
%
% Usage:
% pandoc --latex-engine=xelatex --listings --template=<path to this file> <input.pd> -o <output.pdf>
%