Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts

Friday, August 08, 2025

pandoc: Word to markdown

pandoc input.docx -t markdown_strict -o output.md

Friday, August 01, 2025

Wednesday, July 30, 2025

Add Browser MCP to Claude Code

claude mcp add-json browsermcp '{ "type": "stdio", "command": "npx", "args": ["@browsermcp/mcp@latest"]}'
https://github.com/browsermcp/mcp

Wednesday, July 23, 2025

Linux: convert docx to markdown using pandoc

pandoc -f docx -t markdown_strict input.docx -o foo.md From: https://stackoverflow.com/a/33149947/248823

Thursday, June 19, 2025

Thursday, March 27, 2025

Convert all pdf files to txt files

find . -name '*.pdf' -print0 | xargs -0 -n1 pdftotext

Wednesday, November 27, 2024

Linux: ollama chagne default model location

Stop ollama sertice
Run systemctl edit ollama.service.
Add the line Environment="OLLAMA_MODELS=/path/to/new/location" under the [Service] section.
Save and exit the editor.
start ollama sertice

Wednesday, September 25, 2024

Joni pdf files into one file using pdftk

pdftk base.pdf 1.pdf 2.pdf 3*.pdf output joined.pdf

Friday, April 07, 2023

Monday, February 27, 2023

Linux: Copy all files from subdirectories into one folder

find zfiles/* -type f -mindepth 2 -print0 | xargs -0 cp -t ./sub1

Sunday, August 21, 2022

Linux: json to parquet

Use: https://github.com/domoritz/json2parquet ~/.cargo/bin/json2parquet -c zstd data_000000.json data_000000.parquet

Monday, March 07, 2022

qrencode: create pdf QR code

qrencode -s 6 -l H -o "URL.png" "https://some-url"

Tuesday, September 21, 2021

wget: Download full page in a loop

for p in {1..96};do wget -p -k -H -e robots=off https:///page${p}.html;done

Monday, May 31, 2021

Saturday, December 19, 2020

Jyputer: Don't ask for password nor token

alias jn='jupyter notebook --no-browser --ContentsManager.allow_hidden=True --NotebookApp.password="" --NotebookApp.token=""'

Monday, January 06, 2020

mkvpropedit: mkv disable subtitles

mkvpropedit movie.mkv --edit track:s1 --set flag-default=0

Wednesday, November 13, 2019

ffmpeg: convert audio to acc but copy video

ffmpeg -i ./input_file.mkv -c:v copy -c:a libfdk_aac -vbr 3 output.mkv

Monday, October 14, 2019

Tmux: nested sessions C-a binding

Add this to your local `~/.tmux.conf`

bind-key -n C-a send-prefix

Saturday, October 05, 2019

vnc using systemd in user mode

File: /home/mwo2/.config/systemd/user/myvnc@:1.service [Unit]
Description=My VNC

[Service]
Type=simple
ExecStartPre=/bin/sh -c '/usr/bin/vncserver -kill %i > /dev/null 2>&1 || :'
ExecStart=/usr/bin/vncserver -geometry 1920x1080 :%i -xstartup /home/mwo2/.vnc/xstartup -SecurityTypes None -fg
ExecStop=/usr/bin/vncserver -kill :i

[Install]
WantedBy=default.target


-fg and Type=simple are important!

systemctl --user enable myvnc@\:1.service

Saturday, September 28, 2019

mkvpropedit: change default audio track

mkvpropedit --edit track:a1 --set flag-default=1 file.mkv