changes
This commit is contained in:
@@ -1,4 +1,13 @@
|
||||
# My Digital Garden
|
||||

|
||||
|
||||
Assorted code snippets and scripts for automation, infrastructure, and development.
|
||||
Assorted guides, code snippets, and scripts for automation, infrastructure, and development.
|
||||
|
||||
## Guides
|
||||
- [Get started with Neovim and C# with OmniSharp](./guides/c_sharp_and_nvim.md)
|
||||
- [Record gifs with wf-recorder and ffmpeg and add small gifs to your Git repositories](./guides/record-gifs-for-git-repos.md)
|
||||
|
||||
## Snippets
|
||||
- [I have sometimes had troubles with copying to clipboard on remote servers, this tmux/bash script helped me](./snippets/clipboard-remote-servers-tmux.md)
|
||||
- [Typst is amazing, here is a dependency free way to develop and automate Typst documents](./snippets/typst-local-automation.md)
|
||||
- [Use evince and bash to auto reload a pdf when it is changed](./snippets/watch-pdf.md)
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
# Clipboard handy snippets
|
||||
I have sometimes come in trouble in virtual environments that i cannot use the clipboard when using vim and stuff like that.
|
||||
Here is a small mitigation strategy that can be paseted into bashrc.
|
||||
The requirement here is of course to have tmux on the remote computer.
|
||||
|
||||
## tmux remote session wl-copy style
|
||||
insert this into bashrc on remote computer
|
||||
```
|
||||
clip() {
|
||||
local input
|
||||
if [ -t 0 ]; then
|
||||
input="$*"
|
||||
else
|
||||
input=$(cat)
|
||||
fi
|
||||
printf "\033]52;c;%s\007" "$(echo -n "$input" | base64)" > "$(tmux display-message -p '#{client_tty}')"
|
||||
}
|
||||
```
|
||||
|
||||
you can then do something like `clip "literal string"`
|
||||
and you have `literal string` in your clipboard on the remote host also, this is assuming you use tmux on in a ssh session, and this script is in .bashrc on the remote machine okay?
|
||||
|
||||
to pipe the result of whatever do something like this `sudo systemctl status firewalld | clip`
|
||||
|
||||
and that output is in your clipboard
|
||||
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
# Watch PDF
|
||||
|
||||
I use this script for working on Typst project, see [here](./typst-local-automation.md)
|
||||
|
||||
So when using typst to create documents, it is fine to have something watching the typst changes, and reload the
|
||||
file with evince, so you constantly see the changes to the pdf.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user