small overall adjustments
This commit is contained in:
@@ -0,0 +1,25 @@
|
|||||||
|
# Record GIFs for README.md files
|
||||||
|
So I really enjoy when oss repositories have some small gif files for showcasing what the tool does. When it makes sense of course.
|
||||||
|
So here is my way of doing it on fedora 44 with [wf-recorder](https://github.com/ammen99/wf-recorder) for recording screen to mp4, and [ffmpeg](https://www.ffmpeg.org/about.html) for post processing to .gif.
|
||||||
|
|
||||||
|
Not mutch to it.
|
||||||
|
mm perhaps there is something like using webp instead of gifs? but I think it is more difficult to run really well on Gitea.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
wf-recorder -g "$(slurp)" \
|
||||||
|
-f <MP4-FILE-NAME>.mp4 \
|
||||||
|
-c libx264 \
|
||||||
|
-r 30 \
|
||||||
|
-p crf=18 \
|
||||||
|
-p preset=slow
|
||||||
|
```
|
||||||
|
|
||||||
|
like something like this
|
||||||
|
```bash
|
||||||
|
ffmpeg -i hagfish.mp4 \
|
||||||
|
-vf "fps=15,scale=920:-1:flags=lanczos,split[s0][s1];[s0]palettegen=max_colors=256:stats_mode=diff[p];[s1][p]paletteuse=dither=sierra2_4a" \
|
||||||
|
-loop 0 \
|
||||||
|
hagfish.gif
|
||||||
|
```
|
||||||
|
|
||||||
|
keep the scale at 920, I think it looks good on Gitea and probably GitHub
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
# Record GIFs for README.md files
|
|
||||||
|
|
||||||
On Fedora I use [wf-recorder](https://github.com/ammen99/wf-recorder) for recording screen to mp4, and [ffmpeg](https://www.ffmpeg.org/about.html) for post processing to .gif.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
wf-recorder -g "$(slurp)" \
|
|
||||||
-f <MP4-FILE-NAME>.mp4 \
|
|
||||||
-c libx264 \
|
|
||||||
-r 30 \
|
|
||||||
-p crf=18 \
|
|
||||||
-p preset=slow
|
|
||||||
```
|
|
||||||
|
|
||||||
like something like this
|
|
||||||
```bash
|
|
||||||
ffmpeg -i hagfish.mp4 \
|
|
||||||
-vf "fps=15,scale=920:-1:flags=lanczos,split[s0][s1];[s0]palettegen=max_colors=256:stats_mode=diff[p];[s1][p]paletteuse=dither=sierra2_4a" \
|
|
||||||
-loop 0 \
|
|
||||||
hagfish.gif
|
|
||||||
```
|
|
||||||
|
|
||||||
keep the scale at 920, I think it looks good on Gitea and probably GitHub
|
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
# Clipboard handy snippets
|
# 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
|
## tmux remote session wl-copy style
|
||||||
insert this into bashrc on remote computer
|
insert this into bashrc on remote computer
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
# 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,17 +1,36 @@
|
|||||||
So for like live updating or recompiling the pdf document with a justfile that looks like this in one terminal window
|
# Typst Local Development Loop
|
||||||
|
I truly enjoy Typst, but having a really dependency free experience I use this method to get live reloading of the pdf file I am currently working on.
|
||||||
|
I use Justfile, but anything will do, just fire the commands in the cli.
|
||||||
|
|
||||||
```justfile
|
## Workflow
|
||||||
watch-typst doc lang="da":
|
So for like live updating or recompiling the pdf document with a justfile that looks like this in one terminal window
|
||||||
|
(Sorry, this Justfile a bit clumpsy, but I hope the point gets across).
|
||||||
|
|
||||||
|
```just
|
||||||
|
# Watch Typst document with language parameter
|
||||||
|
watch-cv-typst doc lang="da":
|
||||||
typst watch --input lang={{ lang }} {{ doc }}.typ ./output/{{ doc }}-{{ lang }}.pdf
|
typst watch --input lang={{ lang }} {{ doc }}.typ ./output/{{ doc }}-{{ lang }}.pdf
|
||||||
|
|
||||||
watch-pdf doc lang="da":
|
# Watch generated PDF output
|
||||||
|
watch-cv-pdf doc lang="da":
|
||||||
watch-pdf ./output/{{ doc }}-{{ lang }}.pdf
|
watch-pdf ./output/{{ doc }}-{{ lang }}.pdf
|
||||||
|
|
||||||
build doc:
|
# Build CV in all three languages (English, Danish, Faroese)
|
||||||
typst compile --input lang=en {{ doc }}.typ ./output/{{ doc }}-en.pdf
|
build-cv:
|
||||||
typst compile --input lang=da {{ doc }}.typ ./output/{{ doc }}-da.pdf
|
typst compile --input lang=en ./cv.typ ./output/cv-en.pdf
|
||||||
typst compile --input lang=fo {{ doc }}.typ ./output/{{ doc }}-fo.pdf
|
typst compile --input lang=da ./cv.typ ./output/cv-da.pdf
|
||||||
|
typst compile --input lang=fo ./cv.typ ./output/cv-fo.pdf
|
||||||
|
|
||||||
|
# Build cover letter from YAML input
|
||||||
|
build-letter yaml output:
|
||||||
|
typst compile --input cover-letter={{ yaml }} letter.typ {{ output }}
|
||||||
|
|
||||||
|
# Live watch mode for cover letter compilation
|
||||||
|
watch-letter-typst yaml output:
|
||||||
|
typst watch --input cover-letter={{ yaml }} letter.typ {{ output }}
|
||||||
|
|
||||||
|
watch-letter-pdf doc:
|
||||||
|
watch-pdf {{ doc }}.pdf
|
||||||
```
|
```
|
||||||
|
|
||||||
While the machine having the watch-pdf script available in PATH
|
While the machine having the watch-pdf script available in PATH
|
||||||
|
|||||||
Reference in New Issue
Block a user