Compare commits

...

10 Commits

Author SHA1 Message Date
dl92
086dbbd983 update 2025-10-25 22:02:52 +01:00
dl92
aa7e41be8e update 2025-03-15 20:06:23 +00:00
dl92
f5cfa128d5 update gitignore 2025-02-23 23:49:41 +00:00
dl92
9badbfcd32 update notes 2025-02-23 23:48:17 +00:00
ys
407ea7fed9 note updates 2025-01-10 23:28:45 +00:00
ys
65c058a2b3 update tmux notes 2025-01-03 00:12:07 +01:00
ys
a02480b07c Merge branch 'master' of ssh://chillibilly.pw:/volume1/Git/ysrepo
merging with remote?
2024-12-25 23:12:48 +01:00
ys
6176e96386 update notes - exif tool 2024-12-25 23:03:38 +01:00
ys
45211dee1b add bash scripts 2024-12-21 00:25:15 +00:00
ys
f66e9f8b43 tamper monkey js script for bypass paywall 2024-12-20 22:18:54 +00:00
28 changed files with 26660 additions and 30 deletions

5
.gitignore vendored
View File

@@ -1,2 +1,7 @@
*.pyc *.pyc
*.db *.db
*.m4a
*.mp4
*.mp3
*.json
notes/zettlekasten/.obsidian/*

View File

@@ -0,0 +1,5 @@
#!/bin/bash
#sshfs -o allow_other,default_permissions ys@192.168.0.102:/home/ys /home/ys/ltop_mount/
sshfs -o allow_other,auto_unmount parents@192.168.0.103:/home/parents /home/ys/mltop_mount/parents
sshfs -o allow_other,auto_unmount mirijs@192.168.0.103:/home/mirijs /home/ys/mltop_mount/miri

View File

@@ -0,0 +1,33 @@
function n ()
{
# Block nesting of nnn in subshells
[ "${NNNLVL:-0}" -eq 0 ] || {
echo "nnn is already running"
return
}
# The behaviour is set to cd on quit (nnn checks if NNN_TMPFILE is set)
# If NNN_TMPFILE is set to a custom path, it must be exported for nnn to
# see. To cd on quit only on ^G, remove the "export" and make sure not to
# use a custom path, i.e. set NNN_TMPFILE *exactly* as follows:
# NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
export NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
# Unmask ^Q (, ^V etc.) (if required, see `stty -a`) to Quit nnn
# stty start undef
# stty stop undef
# stty lwrap undef
# stty lnext undef
# The command builtin allows one to alias nnn to n, if desired, without
# making an infinitely recursive alias
command nnn "$@"
[ ! -f "$NNN_TMPFILE" ] || {
. "$NNN_TMPFILE"
rm -f "$NNN_TMPFILE" > /dev/null
}
}

View File

@@ -0,0 +1,11 @@
#!/usr/bin/env sh
if [ -n "$TMUX" ] ; then
# tmux session running
tmux split-window -h "nano \"$*\""
else
# Remove option --tab for new window
#xfce4-terminal --tab -e "vim \"$*\""
tmux split-window -h "vim \"$*\""
#gnome-terminal --tab -e "vim \"$*\""
fi

View File

@@ -0,0 +1,39 @@
nnn-preview ()
{
# Block nesting of nnn in subshells
if [ -n "$NNNLVL" ] && [ "${NNNLVL:-0}" -ge 1 ]; then
echo "nnn is already running"
return
fi
# The default behaviour is to cd on quit (nnn checks if NNN_TMPFILE is set)
# If NNN_TMPFILE is set to a custom path, it must be exported for nnn to see.
# To cd on quit only on ^G, remove the "export" and set NNN_TMPFILE *exactly* as this:
# NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
export NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd"
# This will create a fifo where all nnn selections will be written to
NNN_FIFO="$(mktemp --suffix=-nnn -u)"
export NNN_FIFO
(umask 077; mkfifo "$NNN_FIFO")
# Preview command
preview_cmd="/media/dl92/mydata/projects/code/Bash/nnn/preview_cmd.sh"
# Use `tmux` split as preview
if [ -e "${TMUX%%,*}" ]; then
tmux split-window -e "NNN_FIFO=$NNN_FIFO" -dh "$preview_cmd"
# Use `xterm` as a preview window
elif (which xterm &> /dev/null); then
xterm -e "$preview_cmd" &
# Unable to find a program to use as a preview window
else
echo "unable to open preview, please install tmux or xterm"
fi
nnn "$@"
rm -f "$NNN_FIFO"
}

View File

@@ -0,0 +1,14 @@
source /home/ys/Data/projects/code/Bash/nnn/cdonquit.sh
alias n='n -de'
#export PATH="$HOME/Data/projects/devtools/git/nnn:$HOME/.local/bin:$PATH"
export NNN_PLUG='p:preview-tui'
#export TERM=xterm-256color
export NNN_FIFO=/tmp/nnn.fifo
export EDITOR='sudo nano'
export VISUAL='sudo nano'
#export NNN_TMPFILE="/tmp/nnn"
#"$HOME/.config/nnn/.lastd"
#export NNN_ICONLOOKUP= 1

View File

@@ -0,0 +1,46 @@
#!/usr/bin/env sh
# #############################################################################
# File: preview_cmd.sh
# Description: Minimal example to preview files and directories
# No external dependencies
# Can be easily extended
# Automatically exits when the NNN_FIFO closes
# Prints a `tree` if directory or `head` if it's a file
#
# Shell: POSIX compliant
# Author: Todd Yamakawa
#
# ToDo:
# 1. Add support for more types of files
# e.g. binary files, we shouldn't try to `head` those
# #############################################################################
# Check FIFO
NNN_FIFO=${NNN_FIFO:-$1}
if [ ! -r "$NNN_FIFO" ]; then
echo "Unable to open \$NNN_FIFO='$NNN_FIFO'" | less
exit 2
fi
# Read selection from $NNN_FIFO
while read -r selection; do
clear
lines=$(($(tput lines)-1))
cols=$(tput cols)
# Print directory tree
if [ -d "$selection" ]; then
cd "$selection" || continue
tree | head -n $lines | cut -c 1-"$cols"
continue
fi
# Print file head
if [ -f "$selection" ]; then
head -n $lines "$selection" | cut -c 1-"$cols"
continue
fi
# Something went wrong
echo "Unknown type: '$selection'"
done < "$NNN_FIFO"

View File

@@ -0,0 +1 @@
nnnconfig.sh

View File

@@ -0,0 +1,3 @@
#!/bin/bash
scrcpy --turn-screen-off --disable-screensaver --show-touches --stay-awake --video-codec=h265 --video-bit-rate=16M --audio-bit-rate=256K --max-fps=144 --max-size=2160

View File

@@ -0,0 +1,8 @@
#!/bin/bash
cd /home/ys/Data/projects/llm/OpenWebUI
open-webui serve --port 8085 &

File diff suppressed because it is too large Load Diff

1
notes/.obsidian/app.json vendored Normal file
View File

@@ -0,0 +1 @@
{}

3
notes/.obsidian/appearance.json vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"theme": "obsidian"
}

View File

@@ -0,0 +1,3 @@
[
"dataview"
]

30
notes/.obsidian/core-plugins.json vendored Normal file
View File

@@ -0,0 +1,30 @@
{
"file-explorer": true,
"global-search": true,
"switcher": true,
"graph": true,
"backlink": true,
"canvas": true,
"outgoing-link": true,
"tag-pane": true,
"properties": false,
"page-preview": true,
"daily-notes": true,
"templates": true,
"note-composer": true,
"command-palette": true,
"slash-command": false,
"editor-status": true,
"bookmarks": true,
"markdown-importer": false,
"zk-prefixer": false,
"random-note": false,
"outline": true,
"word-count": true,
"slides": false,
"audio-recorder": false,
"workspaces": false,
"file-recovery": true,
"publish": false,
"sync": false
}

20725
notes/.obsidian/plugins/dataview/main.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,11 @@
{
"id": "dataview",
"name": "Dataview",
"version": "0.5.67",
"minAppVersion": "0.13.11",
"description": "Complex data views for the data-obsessed.",
"author": "Michael Brenan <blacksmithgu@gmail.com>",
"authorUrl": "https://github.com/blacksmithgu",
"helpUrl": "https://blacksmithgu.github.io/obsidian-dataview/",
"isDesktopOnly": false
}

View File

@@ -0,0 +1,146 @@
/** Live Preview padding fixes, specifically for DataviewJS custom HTML elements. */
.is-live-preview .block-language-dataviewjs > p, .is-live-preview .block-language-dataviewjs > span {
line-height: 1.0;
}
.block-language-dataview {
overflow-y: auto;
}
/*****************/
/** Table Views **/
/*****************/
/* List View Default Styling; rendered internally as a table. */
.table-view-table {
width: 100%;
}
.table-view-table > thead > tr, .table-view-table > tbody > tr {
margin-top: 1em;
margin-bottom: 1em;
text-align: left;
}
.table-view-table > tbody > tr:hover {
background-color: var(--table-row-background-hover);
}
.table-view-table > thead > tr > th {
font-weight: 700;
font-size: larger;
border-top: none;
border-left: none;
border-right: none;
border-bottom: solid;
max-width: 100%;
}
.table-view-table > tbody > tr > td {
text-align: left;
border: none;
font-weight: 400;
max-width: 100%;
}
.table-view-table ul, .table-view-table ol {
margin-block-start: 0.2em !important;
margin-block-end: 0.2em !important;
}
/** Rendered value styling for any view. */
.dataview-result-list-root-ul {
padding: 0em !important;
margin: 0em !important;
}
.dataview-result-list-ul {
margin-block-start: 0.2em !important;
margin-block-end: 0.2em !important;
}
/** Generic grouping styling. */
.dataview.result-group {
padding-left: 8px;
}
/*******************/
/** Inline Fields **/
/*******************/
.dataview.inline-field-key {
padding-left: 8px;
padding-right: 8px;
font-family: var(--font-monospace);
background-color: var(--background-primary-alt);
color: var(--text-nav-selected);
}
.dataview.inline-field-value {
padding-left: 8px;
padding-right: 8px;
font-family: var(--font-monospace);
background-color: var(--background-secondary-alt);
color: var(--text-nav-selected);
}
.dataview.inline-field-standalone-value {
padding-left: 8px;
padding-right: 8px;
font-family: var(--font-monospace);
background-color: var(--background-secondary-alt);
color: var(--text-nav-selected);
}
/***************/
/** Task View **/
/***************/
.dataview.task-list-item, .dataview.task-list-basic-item {
margin-top: 3px;
margin-bottom: 3px;
transition: 0.4s;
}
.dataview.task-list-item:hover, .dataview.task-list-basic-item:hover {
background-color: var(--text-selection);
box-shadow: -40px 0 0 var(--text-selection);
cursor: pointer;
}
/*****************/
/** Error Views **/
/*****************/
div.dataview-error-box {
width: 100%;
min-height: 150px;
display: flex;
align-items: center;
justify-content: center;
border: 4px dashed var(--background-secondary);
}
.dataview-error-message {
color: var(--text-muted);
text-align: center;
}
/*************************/
/** Additional Metadata **/
/*************************/
.dataview.small-text {
font-size: smaller;
color: var(--text-muted);
margin-left: 3px;
}
.dataview.small-text::before {
content: "(";
}
.dataview.small-text::after {
content: ")";
}

174
notes/.obsidian/workspace.json vendored Normal file
View File

@@ -0,0 +1,174 @@
{
"main": {
"id": "d5ee577d351716f5",
"type": "split",
"children": [
{
"id": "72079e5077dab8b4",
"type": "tabs",
"children": [
{
"id": "c30d841879f26cb5",
"type": "leaf",
"state": {
"type": "markdown",
"state": {
"file": "zettlekasten/1 - Fleeting Notes/Synology NAS.md",
"mode": "source",
"source": false
},
"icon": "lucide-file",
"title": "Synology NAS"
}
}
]
}
],
"direction": "vertical"
},
"left": {
"id": "5e973e092aee7c37",
"type": "split",
"children": [
{
"id": "31042066028cdfcd",
"type": "tabs",
"children": [
{
"id": "b9a0b2a0dac98d79",
"type": "leaf",
"state": {
"type": "file-explorer",
"state": {
"sortOrder": "alphabetical"
},
"icon": "lucide-folder-closed",
"title": "Files"
}
},
{
"id": "8be16fe8043f30ef",
"type": "leaf",
"state": {
"type": "search",
"state": {
"query": "",
"matchingCase": false,
"explainSearch": false,
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical"
},
"icon": "lucide-search",
"title": "Search"
}
},
{
"id": "be6f0e5548189ed5",
"type": "leaf",
"state": {
"type": "bookmarks",
"state": {},
"icon": "lucide-bookmark",
"title": "Bookmarks"
}
}
]
}
],
"direction": "horizontal",
"width": 300
},
"right": {
"id": "7899577dac819d83",
"type": "split",
"children": [
{
"id": "0c9f422cff7d9b9d",
"type": "tabs",
"children": [
{
"id": "0d6831c13ce30e71",
"type": "leaf",
"state": {
"type": "backlink",
"state": {
"file": "zettlekasten/1 - Fleeting Notes/tmux wflow.md",
"collapseAll": false,
"extraContext": false,
"sortOrder": "alphabetical",
"showSearch": false,
"searchQuery": "",
"backlinkCollapsed": false,
"unlinkedCollapsed": true
},
"icon": "links-coming-in",
"title": "Backlinks for tmux wflow"
}
},
{
"id": "8ce2ed24241b9a2e",
"type": "leaf",
"state": {
"type": "outgoing-link",
"state": {
"file": "zettlekasten/1 - Fleeting Notes/tmux wflow.md",
"linksCollapsed": false,
"unlinkedCollapsed": true
},
"icon": "links-going-out",
"title": "Outgoing links from tmux wflow"
}
},
{
"id": "539664e4dc21afa2",
"type": "leaf",
"state": {
"type": "tag",
"state": {
"sortOrder": "frequency",
"useHierarchy": true
},
"icon": "lucide-tags",
"title": "Tags"
}
},
{
"id": "70bbabcd425e92c9",
"type": "leaf",
"state": {
"type": "outline",
"state": {
"file": "zettlekasten/1 - Fleeting Notes/tmux wflow.md"
},
"icon": "lucide-list",
"title": "Outline of tmux wflow"
}
}
]
}
],
"direction": "horizontal",
"width": 300,
"collapsed": true
},
"left-ribbon": {
"hiddenItems": {
"switcher:Open quick switcher": false,
"graph:Open graph view": false,
"canvas:Create new canvas": false,
"daily-notes:Open today's daily note": false,
"templates:Insert template": false,
"command-palette:Open command palette": false
}
},
"active": "c30d841879f26cb5",
"lastOpenFiles": [
"zettlekasten/1 - Fleeting Notes/Tiling Managers.md",
"zettlekasten/1 - Fleeting Notes/tmux wflow.md",
"zettlekasten/1 - Fleeting Notes/Untitled.md",
"zettlekasten/1 - Fleeting Notes/Backup and Restore Solution.md",
"zettlekasten/MOCS/Linux Wflow.md",
"zettlekasten/MOCS/Persian Poetry.md"
]
}

View File

@@ -1,3 +1,4 @@
{ {
"theme": "obsidian" "theme": "obsidian",
"cssTheme": "GitHub Theme"
} }

View File

@@ -17,6 +17,6 @@
"repelStrength": 10, "repelStrength": 10,
"linkStrength": 1, "linkStrength": 1,
"linkDistance": 250, "linkDistance": 250,
"scale": 1, "scale": 0.6666666666666666,
"close": true "close": true
} }

View File

@@ -13,12 +13,12 @@
"state": { "state": {
"type": "markdown", "type": "markdown",
"state": { "state": {
"file": "1 - Fleeting Notes/Synology NAS.md", "file": "1 - Fleeting Notes/tmux wflow.md",
"mode": "source", "mode": "source",
"source": false "source": false
}, },
"icon": "lucide-file", "icon": "lucide-file",
"title": "Synology NAS" "title": "tmux wflow"
} }
}, },
{ {
@@ -101,7 +101,8 @@
} }
], ],
"direction": "horizontal", "direction": "horizontal",
"width": 633.5 "width": 234.5,
"collapsed": true
}, },
"right": { "right": {
"id": "0ba52521b266806f", "id": "0ba52521b266806f",
@@ -163,10 +164,10 @@
"state": { "state": {
"type": "outline", "type": "outline",
"state": { "state": {
"file": "3 - References/Puzzles.md" "file": "1 - Fleeting Notes/tmux wflow.md"
}, },
"icon": "lucide-list", "icon": "lucide-list",
"title": "Outline of Puzzles" "title": "Outline of tmux wflow"
} }
}, },
{ {
@@ -189,14 +190,14 @@
"state": { "state": {
"type": "file-properties", "type": "file-properties",
"state": { "state": {
"file": "1 - Fleeting Notes/Synology NAS.md" "file": "1 - Fleeting Notes/tmux wflow.md"
}, },
"icon": "lucide-info", "icon": "lucide-info",
"title": "File properties for Synology NAS" "title": "File properties for tmux wflow"
} }
} }
], ],
"currentTab": 5 "currentTab": 3
} }
], ],
"direction": "horizontal", "direction": "horizontal",
@@ -212,26 +213,28 @@
"command-palette:Open command palette": false "command-palette:Open command palette": false
} }
}, },
"active": "33923136d84ea6a5", "active": "d4c0ab3a4686223c",
"lastOpenFiles": [ "lastOpenFiles": [
"MOCS/Linux Wflow.md", "MOCS/Linux Wflow.md",
"1 - Fleeting Notes/Firejail.md", "1 - Fleeting Notes/tmux wflow.md",
"1 - Fleeting Notes/Synology NAS.md",
"3 - References/Linux Services.md",
"1 - Fleeting Notes/Exposing Virtual machines to LAN.md",
"1 - Fleeting Notes/Backup and Restore Solution.md",
"1 - Fleeting Notes/LLMs.md",
"1 - Fleeting Notes/Omar Khayyam.md",
"1 - Fleeting Notes/Russel Conjugation.md",
"1 - Fleeting Notes/Tiling Managers.md", "1 - Fleeting Notes/Tiling Managers.md",
"1 - Fleeting Notes/Untitled.md", "1 - Fleeting Notes/Untitled.md",
"3 - References/Networking.md",
"3 - References/Hacker News.md",
"3 - References/Solving Techniques.md", "3 - References/Solving Techniques.md",
"MOCS/Puzzles.md", "3 - References/Networking.md",
"3 - References/Linux Services.md",
"MOCS/Persian Poetry.md", "MOCS/Persian Poetry.md",
"3 - References/Knight Moves 6.md", "1 - Fleeting Notes/Metadata Manipulation.md",
"1 - Fleeting Notes/Backup and Restore Solution.md",
"1 - Fleeting Notes/Synology NAS.md",
"3 - References/Dual Booting.md", "3 - References/Dual Booting.md",
"3 - References/Hacker News.md",
"1 - Fleeting Notes/Russel Conjugation.md",
"1 - Fleeting Notes/Omar Khayyam.md",
"1 - Fleeting Notes/Firejail.md",
"1 - Fleeting Notes/Exposing Virtual machines to LAN.md",
"MOCS/Puzzles.md",
"1 - Fleeting Notes/LLMs.md",
"3 - References/Knight Moves 6.md",
"Templates/MOC.md", "Templates/MOC.md",
"Untitled.canvas", "Untitled.canvas",
"().md", "().md",

View File

@@ -1,6 +1,6 @@
--- ---
tags: tags:
parents: parents: "[[Linux Wflow]]"
date/time: 2024-11-17T22:16:00 date/time: 2024-11-17T22:16:00
--- ---
[Rest and Relax](https://relax-and-recover.org/rear-user-guide/index.html) - implement solution on laptop and desktop [Rest and Relax](https://relax-and-recover.org/rear-user-guide/index.html) - implement solution on laptop and desktop
@@ -55,3 +55,4 @@ open webui: docker run -d -p 3000:8080 --network=host -e OLLAMA_BASE_URL=http://
# BorgBackup workflow # BorgBackup workflow
https://borgbackup.readthedocs.io/en/stable/quickstart.html

View File

@@ -3,6 +3,15 @@ tags:
parents: parents:
date/time: 2024-11-02T00:58:00 date/time: 2024-11-02T00:58:00
--- ---
run the openwebui service (https://docs.openwebui.com/getting-started/quick-start)
docker run -d -p 3000:8080 --gpus all -e WEBUI_AUTH=False -e OLLAMA_BASE_URL=http://127.0.0.1:11434 -v open-webui:/app/backend/data --name open-webui ghcr.io/open-webui/open-webui:cuda
ollama can pull models via:
ollama pull lama2:7b
https://www.youtube.com/watch?v=9vM4p9NN0Ts stanford course https://www.youtube.com/watch?v=9vM4p9NN0Ts stanford course
@@ -42,3 +51,8 @@ for example:
- LLMs are generally Autoregressive (AR): $$ p(x_1,x_2,...,x_L)=p(x_1)p(x_2|x_1)p(x_3|x_1,x_2),...p(x_L|x_1:x_{L-1})= \prod_i p(x_i|x_1:x_{i-1})$$ - LLMs are generally Autoregressive (AR): $$ p(x_1,x_2,...,x_L)=p(x_1)p(x_2|x_1)p(x_3|x_1,x_2),...p(x_L|x_1:x_{L-1})= \prod_i p(x_i|x_1:x_{i-1})$$
**Task**: predict next word: **Task**: predict next word:
# pytorch
https://blog.ezyang.com/2019/05/pytorch-internals/

View File

@@ -0,0 +1,16 @@
---
tags:
parents:
date/time:
---
# Overview
leader key : space (default)
## Lazygit + lillypond +nvim workflow
- create a local repository in nvim
- create a lilypond .ly file
- commit and push to remote repository

View File

@@ -0,0 +1,334 @@
---
tags:
parents: "[[Linux Wflow]]"
date/time: 2024-12-25T22:42:00
---
# USECASE
- AQA GCSE paper - name messed up therefore rename with metadata
```
exiftool -s '-FileName<${Description}_${Title}.%e' *.pdf
```
# COPILOT
92dl92: whats the difference between the free account and paid one
GitHub Copilot: The main differences between a free GitHub account and a paid one (GitHub Pro) include:
1. **Private Repositories**:
- Free: Unlimited private repositories with a limited number of collaborators.
- Pro: Unlimited private repositories with unlimited collaborators.
2. **Features**:
- Free: Basic features including issues, pull requests, and project management tools.
- Pro: Additional features such as advanced code review tools, required reviewers, and more.
3. **Actions and Packages**:
- Free: Limited usage of GitHub Actions and Packages.
- Pro: Increased usage limits for GitHub Actions and Packages.
4. **Support**:
- Free: Community support.
- Pro: Email support.
5. **Insights and Analytics**:
- Free: Basic insights.
- Pro: Advanced insights and analytics.
For more detailed information, you can visit the [GitHub Pricing page](https://github.com/pricing).
92dl92: i meant copilot
GitHub Copilot: The main differences between the free and paid versions of GitHub Copilot are:
1. **Availability**:
- Free: GitHub Copilot is available for free to verified students, teachers, and maintainers of popular open-source projects.
- Paid: Available to individual developers and organizations with a subscription.
2. **Features**:
- Both free and paid versions offer the same core features, including code suggestions, autocompletion, and assistance with writing code.
3. **Usage Limits**:
- Free: May have some usage limitations or restrictions based on the specific program (e.g., student or open-source maintainer).
- Paid: No usage limitations within the scope of the subscription.
For more detailed information, you can visit the [GitHub Copilot Pricing page](https://github.com/features/copilot).
92dl92: do you know about the exiftool
GitHub Copilot: Yes, ExifTool is a powerful command-line application for reading, writing, and editing metadata in a wide variety of file formats. It is commonly used for handling EXIF data in images, but it supports many other types of metadata and file formats as well.
### Key Features:
- **Read and Write Metadata**: Supports a wide range of metadata formats including EXIF, GPS, IPTC, XMP, JFIF, GeoTIFF, ICC Profile, Photoshop IRB, FlashPix, AFCP, and ID3.
- **Batch Processing**: Can process multiple files at once.
- **File Format Support**: Works with many file types including JPEG, PNG, TIFF, RAW, PDF, and more.
- **Customizable**: Allows for extensive customization and scripting.
### Basic Usage:
To use ExifTool, you can run commands in the terminal. Here are some basic examples:
- **View Metadata**:
```sh
exiftool filename.jpg
```
- **Write Metadata**:
```sh
exiftool -Artist="Your Name" filename.jpg
```
- **Copy Metadata from One File to Another**:
```sh
exiftool -TagsFromFile src.jpg dst.jpg
```
- **Remove All Metadata**:
```sh
exiftool -all= filename.jpg
```
### Installation:
On a Linux system, you can install ExifTool using the package manager. For example, on Ubuntu:
```sh
sudo apt-get install exiftool
```
For more detailed information and advanced usage, you can refer to the [ExifTool documentation](https://exiftool.org/).
92dl92: i would like to use exiftool to rename a file based on the value of two or three metadata items
GitHub Copilot: You can use ExifTool to rename files based on metadata values by specifying the desired metadata tags in the rename command. Here is an example of how to do this:
### Example Command:
Suppose you want to rename a file based on the date and time it was taken (`DateTimeOriginal`) and the camera model (`Model`):
```sh
exiftool '-FileName<DateTimeOriginal-${Model}.%e' -d '%Y%m%d_%H%M%S' filename.jpg
```
### Explanation:
- `'-FileName<DateTimeOriginal-${Model}.%e'`: This specifies the new filename format. The `<` operator is used to assign the value of the metadata tags to the filename. `${Model}` is the camera model, and `%e` is the original file extension.
- `-d '%Y%m%d_%H%M%S'`: This specifies the date format. `%Y` is the year, `%m` is the month, `%d` is the day, `%H` is the hour, `%M` is the minute, and `%S` is the second.
- `filename.jpg`: This is the original file.
### Example:
If the original file is named `filename.jpg` and the metadata values are:
- `DateTimeOriginal`: 2023:10:01 12:34:56
- `Model`: CanonEOS
The resulting filename would be:
```
20231001_123456-CanonEOS.jpg
```
### Batch Processing:
To rename multiple files in a directory, you can use a wildcard (`*`):
```sh
exiftool '-FileName<DateTimeOriginal-${Model}.%e' -d '%Y%m%d_%H%M%S' *.jpg
```
This command will rename all `.jpg` files in the current directory based on their `DateTimeOriginal` and `Model` metadata.
For more advanced usage and options, refer to the [ExifTool documentation](https://exiftool.org/).
92dl92: is the use of of the wildcard * equivalant to the -r flag
GitHub Copilot: No, the use of the wildcard `*` and the `-r` flag in ExifTool serve different purposes:
- **Wildcard `*`**: This is used to match multiple files in the current directory. For example, `*.jpg` will match all `.jpg` files in the current directory.
- **`-r` flag**: This flag stands for "recursive" and is used to process files in the current directory and all subdirectories.
### Example with Wildcard:
To rename all `.jpg` files in the current directory based on metadata:
```sh
exiftool '-FileName<DateTimeOriginal-${Model}.%e' -d '%Y%m%d_%H%M%S' *.jpg
```
### Example with `-r` Flag:
To rename all `.jpg` files in the current directory and all subdirectories based on metadata:
```sh
exiftool -r '-FileName<DateTimeOriginal-${Model}.%e' -d '%Y%m%d_%H%M%S' .
```
In this example, the `.` specifies the current directory, and the `-r` flag ensures that the command is applied recursively to all subdirectories.
Use the appropriate option based on whether you need to process files only in the current directory or also in its subdirectories.
92dl92: how would I read specific metadata
GitHub Copilot: To read specific metadata using ExifTool, you can specify the metadata tags you are interested in. Here is how you can do it:
### Example Command:
Suppose you want to read the `DateTimeOriginal` and `Model` metadata from a file:
```sh
exiftool -DateTimeOriginal -Model filename.jpg
```
### Explanation:
- `-DateTimeOriginal`: This specifies that you want to read the `DateTimeOriginal` metadata tag.
- `-Model`: This specifies that you want to read the `Model` metadata tag.
- `filename.jpg`: This is the file from which you want to read the metadata.
### Example Output:
The output will display the values of the specified metadata tags:
```
Date/Time Original : 2023:10:01 12:34:56
Camera Model Name : CanonEOS
```
### Reading Metadata from Multiple Files:
To read the specified metadata from multiple files, you can use a wildcard:
```sh
exiftool -DateTimeOriginal -Model *.jpg
```
### Reading Metadata Recursively:
To read the specified metadata from all files in the current directory and its subdirectories, use the `-r` flag:
```sh
exiftool -r -DateTimeOriginal -Model .
```
This command will read the `DateTimeOriginal` and `Model` metadata from all files in the current directory and its subdirectories.
For more detailed information and advanced usage, refer to the [ExifTool documentation](https://exiftool.org/).
92dl92: how can i see the list of tags for a file
GitHub Copilot: To see the list of all metadata tags for a file using ExifTool, you can simply run the command without specifying any specific tags. Here is how you can do it:
### Example Command:
```sh
exiftool filename.jpg
```
### Explanation:
- `filename.jpg`: This is the file for which you want to see the list of all metadata tags.
### Example Output:
The output will display all the metadata tags and their values for the specified file. It will look something like this:
```
ExifTool Version Number : 12.00
File Name : filename.jpg
File Size : 2.3 MB
File Modification Date/Time : 2023:10:01 12:34:56+00:00
...
Date/Time Original : 2023:10:01 12:34:56
Camera Model Name : CanonEOS
...
```
### Viewing Tags for Multiple Files:
To see the list of all metadata tags for multiple files, you can use a wildcard:
```sh
exiftool *.jpg
```
### Viewing Tags Recursively:
To see the list of all metadata tags for all files in the current directory and its subdirectories, use the `-r` flag:
```sh
exiftool -r .
```
This command will display all metadata tags for all files in the current directory and its subdirectories.
For more detailed information and advanced usage, refer to the [ExifTool documentation](https://exiftool.org/).
92dl92: some of the tags have spaces are there other identifies
GitHub Copilot: Yes, ExifTool provides alternative tag names (also known as "short" or "family 1" group names) that do not contain spaces. These can be used in commands to avoid issues with spaces in tag names.
### Example:
To read the `Date/Time Original` and `Camera Model Name` tags using their alternative identifiers:
```sh
exiftool -DateTimeOriginal -Model filename.jpg
```
### Finding Alternative Identifiers:
To find the alternative identifiers for all tags in a file, you can use the `-s` option, which displays the short names of the tags:
```sh
exiftool -s filename.jpg
```
### Example Output:
The output will display the short names of the tags:
```
ExifToolVersion : 12.00
FileName : filename.jpg
FileSize : 2.3 MB
FileModifyDate : 2023:10:01 12:34:56+00:00
...
DateTimeOriginal : 2023:10:01 12:34:56
Model : CanonEOS
...
```
### Using Family 1 Group Names:
You can also use family 1 group names to specify the tag more precisely. For example:
```sh
exiftool -EXIF:DateTimeOriginal -EXIF:Model filename.jpg
```
### Example Command with Family 1 Group Names:
```sh
exiftool -EXIF:DateTimeOriginal -EXIF:Model filename.jpg
```
This command will read the `DateTimeOriginal` and `Model` tags from the EXIF group.
For more detailed information and advanced usage, refer to the [ExifTool documentation](https://exiftool.org/).
92dl92: to recap, I want to rename file as <Desctiption>_<Title>.pdf where metad data are strings
GitHub Copilot: To rename a file based on the `Description` and `Title` metadata tags using ExifTool, you can use the following command:
### Command:
```sh
exiftool '-FileName<${Description}_${Title}.%e' filename.pdf
```
### Explanation:
- `'-FileName<${Description}_${Title}.%e'`: This specifies the new filename format. The `<` operator is used to assign the value of the metadata tags to the filename. `${Description}` and `${Title}` are the metadata tags, and `%e` is the original file extension.
- `filename.pdf`: This is the original file.
### Example:
If the original file is named `filename.pdf` and the metadata values are:
- `Description`: "ProjectReport"
- `Title`: "Q4Summary"
The resulting filename would be:
```
ProjectReport_Q4Summary.pdf
```
### Batch Processing:
To rename multiple PDF files in a directory based on their `Description` and `Title` metadata, you can use a wildcard:
```sh
exiftool '-FileName<${Description}_${Title}.%e' *.pdf
```
### Recursive Processing:
To rename all PDF files in the current directory and its subdirectories based on their `Description` and `Title` metadata, use the `-r` flag:
```sh
exiftool -r '-FileName<${Description}_${Title}.%e' ./*.pdf
```
This command will rename all `.pdf` files in the current directory and its subdirectories based on their `Description` and `Title` metadata.
For more detailed information and advanced usage, refer to the [ExifTool documentation](https://exiftool.org/).

View File

@@ -6,15 +6,23 @@ date/time: 2024-11-03T23:38:00
--- ---
# Git repo # Git repo
https://kb.synology.com/en-global/DSM/help/Git/git?version=7 ## refs
- https://www.youtube.com/watch?v=PdeJROZijvY
- https://kb.synology.com/en-global/DSM/help/Git/git?version=7
- Setting up Git Server : https://gist.github.com/walkerjeffd/374750c366605cd5123d
- https://www.minmaxgeek.com/blog/fix-synology-ssl#step-2
Setting up Git Server : https://gist.github.com/walkerjeffd/374750c366605cd5123d ### dotfiles
https://www.minmaxgeek.com/blog/fix-synology-ssl#step-2 on server
```
git --bare init dotfiles.git
```
on client side on client side
``` ```
chezmoi init ssh://yousef@chillybilly.pw:/volume1/Git/dotfiles.git
git clone ssh://yousef@chillibilly.pw:~/Projects git clone ssh://yousef@chillibilly.pw:~/Projects
``` ```
@@ -25,9 +33,9 @@ git clone ssh://yousef@chillibilly.pw:~/Projects
``` ```
ssh-keygen -t rsa -b 4096 -C "dl92@protonmail.com" ssh-keygen -t rsa -b 4096 -C "dl92@protonmail.com"
``` ```
- copy keys to server(synology) - copy keys client (dtop) to server(synology,raspberry etc...)
``` ```
ssh-copy-id -n yousef@192.168.0.201 ssh-copy-id -n yousef@192.168.0.201 #dry run or ommit -n
``` ```
- chg /etc/ssh/sshd_config and enable publickeyencryption and prohibit password - chg /etc/ssh/sshd_config and enable publickeyencryption and prohibit password

View File

@@ -0,0 +1,87 @@
---
tags:
- "#tmux"
parents: "[[Linux Wflow]]"
date/time: 2024-12-29T15:51:00
---
# Sessions
## New Sessions
```
tmux
tmux new
tmux new-session
```
named sessions - to encapsulates different workflows
```
tmux new -s networking
tmux new -s development
tmux new -s ai specific stuff
```
## Exit Sessions
```
exit
```
## List Sessions
```
tmux list-sessions
tmux ls
```
## Attach/Detach from sessions
attach ``` tmux attach```
```tmux attach -t <sessionname>```
detach ``` prefix + d```
## Killing Sessions
- within the session:```exit```
- outside the session (e.g detached)
```
tmux kill-session -t "sessionname"
```
# Windows
new window within a session ``` prefix + c```
new session with a named window: ``` tmux new -s <sname> -n <windoname>```
rename window ```prefix + ,```
moving between windows
```
prefix + n or prefix +p
prefix + i where i index of window
```
to close a session have to close *all* windows in session using:
```
exit
prefix + &
```
# Panes
## Vertical
```
prefix + %
prefix +x
```
## Horizontal
```
prefix + "
```
for scrolling
```
prefix +space
```