2023-07-18 18:38:30 +00:00
<!doctype html>
2023-06-30 18:06:13 +00:00
< html >
< head >
< meta charset = "utf-8" / >
< meta name = "viewport" content = "width=device-width, initial-scale=1" / >
< link
rel="stylesheet"
2024-11-28 11:01:17 +00:00
href="https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/5.8.1/github-markdown.min.css"
integrity="sha512-BrOPA520KmDMqieeM7XFe6a3u3Sb3F1JBaQnrIAmWg3EYrciJ+Qqe6ZcKCdfPv26rGcgTrJnZ/IdQEct8h3Zhw=="
2024-11-16 01:25:52 +00:00
crossorigin="anonymous"
referrerpolicy="no-referrer"
2023-06-30 18:06:13 +00:00
/>
< title > haunt98 posts< / title >
< / head >
< style >
.markdown-body {
box-sizing: border-box;
min-width: 200px;
max-width: 980px;
margin: 0 auto;
padding: 45px;
2024-03-01 10:11:20 +00:00
font-family:
Shantell Sans Normal,
Rec Mono Casual,
SF Pro,
Inter,
sans-serif;
font-weight: 500;
}
.markdown-body pre {
font-family:
Berkeley Mono,
IBM Plex Mono,
SF Mono,
Jetbrains Mono,
monospace;
2023-06-30 18:06:13 +00:00
}
@media (max-width: 767px) {
.markdown-body {
padding: 15px;
}
}
< / style >
< body class = "markdown-body" >
2023-08-09 07:22:58 +00:00
< h2 >
< a href = "index.html" > < code > ~< / code > < / a >
< / h2 >
2024-02-29 12:29:26 +00:00
< div class = "markdown-heading" >
< h1 class = "heading-element" > Throw away pastebin< / h1 >
2023-11-19 15:59:21 +00:00
< a
id="user-content-throw-away-pastebin"
2024-03-08 08:12:41 +00:00
class="anchor"
2024-02-29 12:29:26 +00:00
aria-label="Permalink: Throw away pastebin"
2023-11-19 15:59:21 +00:00
href="#throw-away-pastebin"
2024-02-29 12:29:26 +00:00
>< span aria-hidden = "true" class = "octicon octicon-link" > < /span
>< / a >
< / div >
2023-06-30 18:06:13 +00:00
< p > Just a place to throw away some text.< / p >
2024-10-23 08:18:22 +00:00
< div class = "markdown-heading" >
< h2 class = "heading-element" > macOS< / h2 >
< a
id="user-content-macos"
class="anchor"
aria-label="Permalink: macOS"
href="#macos"
>< span aria-hidden = "true" class = "octicon octicon-link" > < /span
>< / a >
< / div >
< p > Never sleep:< / p >
< div class = "highlight highlight-source-shell" >
< pre >
caffeinate -u -t 3600
caffeinate -i< /pre
>
< / div >
< p > Use Touch ID in Terminal:< / p >
< div class = "highlight highlight-source-shell" >
< pre > sudo cp /etc/pam.d/sudo_local.template /etc/pam.d/sudo_local
< span class = "pl-c" > < span class = "pl-c" > #< / span > Uncomment last line< / span >
sudo nano /etc/pam.d/sudo_local< / pre >
< / div >
< p > Hide Developer in Spotlight:< / p >
< div class = "highlight highlight-source-shell" >
< pre > < span class = "pl-c1" > cd< / span > /Applications
touch Xcode.app
< span class = "pl-c" > < span class = "pl-c" > #< / span > Xcode mini version< / span >
xcode-select --install< / pre >
< / div >
< p > Reset launchpad:< / p >
< div class = "highlight highlight-source-shell" >
< pre > defaults write com.apple.dock ResetLaunchPad -bool < span class = "pl-c1" > true< / span > < span class = "pl-k" > ;< / span > killall Dock< / pre >
< / div >
< p > Reduce padding in menu bar (Log out then log in to apply):< / p >
< div class = "highlight highlight-source-shell" >
< pre >
defaults -currentHost write -globalDomain NSStatusItemSelectionPadding -int 6
defaults -currentHost write -globalDomain NSStatusItemSpacing -int 6< /pre
>
< / div >
< p > Tweak Finder:< / p >
< div class = "highlight highlight-source-shell" >
< pre > < span class = "pl-c" > < span class = "pl-c" > #< / span > Use list view< / span >
defaults write com.apple.finder FXPreferredViewStyle -string < span class = "pl-s" > < span class = "pl-pds" > "< / span > Nlsv< span class = "pl-pds" > "< / span > < / span >
< span class = "pl-c" > < span class = "pl-c" > #< / span > Show path bar< / span >
defaults write com.apple.finder ShowPathbar -bool < span class = "pl-c1" > true< / span >
< span class = "pl-c" > < span class = "pl-c" > #< / span > Show status bar< / span >
defaults write com.apple.finder ShowStatusBar -bool < span class = "pl-c1" > true< / span >
< span class = "pl-c" > < span class = "pl-c" > #< / span > Show filename extensions< / span >
defaults write NSGlobalDomain AppleShowAllExtensions -bool < span class = "pl-c1" > true< / span >
< span class = "pl-c" > < span class = "pl-c" > #< / span > Keep folders on top when sorting by name< / span >
defaults write com.apple.finder _FXSortFoldersFirst -bool < span class = "pl-c1" > true< / span >
killall Finder< / pre >
2024-11-22 07:12:32 +00:00
< / div >
< p > Enable accent color:< / p >
< div class = "highlight highlight-source-shell" >
< pre > defaults write -g NSColorSimulateHardwareAccent -bool YES
< span class = "pl-c" > < span class = "pl-c" > #< / span > Value 3-8< / span >
defaults write -g NSColorSimulatedHardwareEnclosureNumber -int 7< / pre >
2024-10-23 08:18:22 +00:00
< / div >
< p > Disable IPv6:< / p >
< div class = "highlight highlight-source-shell" >
< pre >
sudo networksetup -listallnetworkservices
sudo networksetup -setv6off Wi-Fi< /pre
>
< / div >
< p > Clean up leftover data:< / p >
< div class = "highlight highlight-text-adblock" >
< pre >
/Library/Application Support
/Library/LaunchAgents
/Library/LaunchDaemons
/Library/Preferences
/Users/Shared
~/Library/Application Support
~/Library/Fonts (Removed)
~/Library/LaunchAgents
~/Library/Preferences< /pre
>
< / div >
< p > Clean up leftover shell:< / p >
< div class = "highlight highlight-text-adblock" >
< pre >
/etc/bashrc
/etc/profile
/etc/zshrc
/etc/paths.d< /pre
>
< / div >
< p > Clean up clipboard:< / p >
< div class = "highlight highlight-source-shell" >
< pre > pbcopy < span class = "pl-k" > < < / span > /dev/null< / pre >
< / div >
< p >
< a
href="https://mastodon.online/@nikitonsky/112220593113484602"
rel="nofollow"
>Disable < strong > Smart zoom< / strong > in
< strong > Track pad< / strong > settings to make right click instant< /a
>
< / p >
< p > Fix OpenVPN Client 3< / p >
< div class = "highlight highlight-source-shell" >
< pre >
sudo launchctl unload -w /Library/LaunchDaemons/org.openvpn.client.plist
sudo launchctl load -w /Library/LaunchDaemons/org.openvpn.client.plist< /pre
>
< / div >
< p > Bluetooth stutter:< / p >
< div class = "highlight highlight-source-shell" >
< pre >
sudo rm /Library/Preferences/com.apple.Bluetooth.plist
sudo pkill bluetoothd< /pre
>
< / div >
< p > Thanks:< / p >
< ul >
< li >
< a href = "https://apple.stackexchange.com/a/466029" rel = "nofollow"
>Can Touch ID on Mac authenticate sudo in Terminal?< /a
>
< / li >
< li >
< a
href="https://flaky.build/native-fix-for-applications-hiding-under-the-macbook-pro-notch"
rel="nofollow"
>Native fix for applications hiding under the MacBook Pro notch< /a
>
< ul >
< li >
< a href = "https://apple.stackexchange.com/q/406316" rel = "nofollow"
>Can the spacing of menu bar apps be modified in macOS Big Sur and
later?< /a
>
< / li >
< / ul >
< / li >
< li >
< a
href="https://appletoolbox.com/macos-how-to-disable-ipv6/"
rel="nofollow"
>macOS: How to Disable IPv6< /a
>
< / li >
< li >
< a
href="https://gist.github.com/timotgl/f3d8c49ad582ec1af8ff01143465e116"
>How to fully uninstall Logitech G HUB on macOS via terminal/command
line< /a
>
< / li >
< li >
< a href = "https://www.bejarano.io/hardening-macos/" rel = "nofollow"
>Hardening macOS< /a
>
< ul >
< li >
< a href = "https://github.com/drduh/macOS-Security-and-Privacy-Guide"
>https://github.com/drduh/macOS-Security-and-Privacy-Guide< /a
>
< / li >
< / ul >
< / li >
< li >
< a href = "https://mac.install.guide/mac-setup/" rel = "nofollow"
>Mac Setup< /a
>
< / li >
< li >
< a href = "https://github.com/OpenVPN/openvpn3/issues/243"
>https://github.com/OpenVPN/openvpn3/issues/243< /a
>
< / li >
< li >
< a href = "https://stackoverflow.com/q/15872666" rel = "nofollow"
>https://stackoverflow.com/q/15872666< /a
>
< / li >
< li >
< a
href="http://blog.greggant.com/posts/2022/04/10/reclaiming-space-from-system-data-in-macos.html"
rel="nofollow"
>Reclaiming storage/space from 'System Data' in macOS: A tutorial on
understanding the System Data usage< /a
>
< / li >
< li >
< a
href="https://til.simonwillison.net/homebrew/no-verify-attestations"
rel="nofollow"
>Upgrading Homebrew and avoiding the failed to verify attestation
error< /a
>
< / li >
2024-11-22 07:12:32 +00:00
< li >
< a
href="https://georgegarside.com/blog/macos/imac-m1-accent-colours-any-mac/"
rel="nofollow"
>Use iMac M1 accent colours on any Mac< /a
>
< ul >
< li >
< a href = "https://mahdi.jp/apps/accents" rel = "nofollow"
>https://mahdi.jp/apps/accents< /a
>
< / li >
< / ul >
< / li >
2024-12-14 04:49:37 +00:00
< li >
< a href = "https://stackoverflow.com/q/72369320" rel = "nofollow"
>Why always something is running at port 5000 on my mac< /a
>
< / li >
2024-10-23 08:18:22 +00:00
< / ul >
< div class = "markdown-heading" >
< h2 class = "heading-element" > Firefox< / h2 >
< a
id="user-content-firefox"
class="anchor"
aria-label="Permalink: Firefox"
href="#firefox"
>< span aria-hidden = "true" class = "octicon octicon-link" > < /span
>< / a >
< / div >
< p > < code > about:config< / code > :< / p >
< ul >
< li >
< p > Disable unused features:< / p >
< ul >
< li > < code > extensions.pocket.enabled< / code > : false< / li >
< li > < code > identity.fxaccounts.enabled< / code > : false< / li >
< li > < code > reader.parse-on-load.enabled< / code > : false< / li >
< / ul >
< / li >
< li >
< p > Good settings:< / p >
< ul >
< li >
< code
>media.videocontrols.picture-in-picture.video-toggle.always-show< /code
>: true
< / li >
< li > < code > network.IDN_show_punycode< / code > : true< / li >
< li > < code > browser.tabs.insertAfterCurrent< / code > : true< / li >
< / ul >
< / li >
< li >
< p > Encrypted Client Hello (ECH):< / p >
< ul >
< li > < code > network.dns.echconfig.enabled< / code > : true< / li >
< li > < code > network.dns.use_https_rr_as_altsvc< / code > : true< / li >
< / ul >
< / li >
< li >
< p > Experiment< / p >
< ul >
< li > < code > image.jxl.enabled< / code > : true< / li >
< / ul >
< / li >
< / ul >
2024-11-16 01:26:55 +00:00
< p > Extensions:< / p >
< ul >
< li >
< a href = "https://github.com/gorhill/uBlock"
>https://github.com/gorhill/uBlock< /a
>
< / li >
< li >
< a href = "https://github.com/ajayyy/SponsorBlock"
>https://github.com/ajayyy/SponsorBlock< /a
>
< / li >
< li >
< a href = "https://github.com/mozilla/contain-facebook"
>https://github.com/mozilla/contain-facebook< /a
>
< / li >
< li >
< a href = "https://github.com/refined-github/refined-github"
>https://github.com/refined-github/refined-github< /a
>
< / li >
< li >
< a href = "https://github.com/openstyles/stylus"
>https://github.com/openstyles/stylus< /a
>
< / li >
< li >
< a href = "https://github.com/Rayquaza01/HistoryCleaner"
>https://github.com/Rayquaza01/HistoryCleaner< /a
>
< / li >
< li >
< a href = "https://github.com/h43z/audiocontextsuspender"
>https://github.com/h43z/audiocontextsuspender< /a
>
< / li >
< / ul >
2024-10-23 08:18:22 +00:00
< p > Thanks:< / p >
< ul >
< li >
< a
href="https://boyter.org/posts/my-list-of-useful-command-line-tools/"
rel="nofollow"
>My list of useful command line tools< /a
>
< / li >
< li >
< a
href="http://www.quippd.com/firefox/wiki/useful-customizations/"
rel="nofollow"
>Useful Customizations for Firefox< /a
>
< / li >
< li >
< a
href="https://blog.mozilla.org/security/2021/01/07/encrypted-client-hello-the-future-of-esni-in-firefox/"
rel="nofollow"
>Encrypted Client Hello: the future of ESNI in Firefox< /a
>
< / li >
< li >
< a href = "https://www.xudongz.com/blog/2017/idn-phishing/" rel = "nofollow"
>Phishing with Unicode Domains< /a
>
< / li >
< li >
< a href = "https://sizeof.cat/links/" rel = "nofollow"
>https://sizeof.cat/links/< /a
>
< / li >
< / ul >
2024-02-29 12:29:26 +00:00
< div class = "markdown-heading" >
2024-10-23 08:18:22 +00:00
< h2 class = "heading-element" > ssh config< / h2 >
< a
id="user-content-ssh-config"
class="anchor"
aria-label="Permalink: ssh config"
href="#ssh-config"
>< span aria-hidden = "true" class = "octicon octicon-link" > < /span
>< / a >
< / div >
< p > Edit < code > ~/.ssh/config< / code > < / p >
< pre lang = "ssh" > < code > Host *
IdentitiesOnly yes
UseKeychain yes
< / code > < / pre >
< p > Thanks:< / p >
< ul >
< li >
< a
href="https://tim.siosm.fr/blog/2023/01/13/openssh-key-management/"
rel="nofollow"
>OpenSSH client side key management for better privacy and security< /a
>
< / li >
< li >
< a href = "https://stackoverflow.com/a/41576222" rel = "nofollow"
>Git keeps asking me for my ssh key passphrase< /a
>
< ul >
< li >
< a
href="https://developer.apple.com/library/archive/technotes/tn2449/_index.html"
rel="nofollow"
>OpenSSH updates in macOS 10.12.2< /a
>
< / li >
< / ul >
< / li >
< / ul >
< div class = "markdown-heading" >
< h2 class = "heading-element" > git clean up< / h2 >
2023-11-19 15:59:21 +00:00
< a
id="user-content-git-clean-up"
2024-03-08 08:12:41 +00:00
class="anchor"
2024-10-23 08:18:22 +00:00
aria-label="Permalink: git clean up"
2023-11-19 15:59:21 +00:00
href="#git-clean-up"
2024-02-29 12:29:26 +00:00
>< span aria-hidden = "true" class = "octicon octicon-link" > < /span
>< / a >
< / div >
2023-08-03 10:33:40 +00:00
< div class = "highlight highlight-source-shell" >
< pre > < span class = "pl-c" > < span class = "pl-c" > #< / span > Delete untracked< / span >
git clean -fdx
git gc< / pre >
2023-06-30 18:06:13 +00:00
< / div >
2024-02-29 12:29:26 +00:00
< div class = "markdown-heading" >
< h2 class = "heading-element" > Delete < code > .DS_Store< / code > < / h2 >
2023-11-19 15:59:21 +00:00
< a
id="user-content-delete-ds_store"
2024-03-08 08:12:41 +00:00
class="anchor"
2024-02-29 12:29:26 +00:00
aria-label="Permalink: Delete .DS_Store"
2023-11-19 15:59:21 +00:00
href="#delete-ds_store"
2024-02-29 12:29:26 +00:00
>< span aria-hidden = "true" class = "octicon octicon-link" > < /span
>< / a >
< / div >
2023-08-03 10:33:40 +00:00
< p >
With
< a href = "https://stackoverflow.com/q/30483670" rel = "nofollow" > find< / a > :
< / p >
< div class = "highlight highlight-source-shell" >
< pre > find < span class = "pl-c1" > .< / span > -name < span class = "pl-s" > < span class = "pl-pds" > "< / span > .DS_Store< span class = "pl-pds" > "< / span > < / span > -print -type f -delete< / pre >
2023-07-30 10:23:34 +00:00
< / div >
2023-08-03 10:33:40 +00:00
< p > With < a href = "https://github.com/sharkdp/fd" > fd< / a > :< / p >
< div class = "highlight highlight-source-shell" >
< pre > fd -H < span class = "pl-s" > < span class = "pl-pds" > '< / span > ^\.DS_Store$< span class = "pl-pds" > '< / span > < / span > -tf -X rm< / pre >
2023-07-30 10:23:34 +00:00
< / div >
2024-02-29 12:29:26 +00:00
< div class = "markdown-heading" >
< h2 class = "heading-element" >
< a href = "https://github.com/chmln/sd" > sd< / a >
< / h2 >
2024-01-28 07:10:04 +00:00
< a
id="user-content-sd"
2024-03-08 08:12:41 +00:00
class="anchor"
2024-02-29 12:29:26 +00:00
aria-label="Permalink: sd"
2024-01-28 07:10:04 +00:00
href="#sd"
2024-02-29 12:29:26 +00:00
>< span aria-hidden = "true" class = "octicon octicon-link" > < /span
>< / a >
< / div >
2024-01-28 07:10:04 +00:00
< p > Remove proto options:< / p >
< div class = "highlight highlight-source-shell" >
< pre > sd -F < span class = "pl-s" > < span class = "pl-pds" > '< / span > import "validate/validate.proto";< span class = "pl-pds" > '< / span > < / span > < span class = "pl-s" > < span class = "pl-pds" > '< / span > < span class = "pl-pds" > '< / span > < / span > api/raw/< span class = "pl-k" > *< / span > .proto
sd -F < span class = "pl-s" > < span class = "pl-pds" > '< / span > import "marshal-zap.proto";< span class = "pl-pds" > '< / span > < / span > < span class = "pl-s" > < span class = "pl-pds" > '< / span > < span class = "pl-pds" > '< / span > < / span > api/raw/< span class = "pl-k" > *< / span > .proto
sd -f s < span class = "pl-s" > < span class = "pl-pds" > '< / span > \s\[.*?];< span class = "pl-pds" > '< / span > < / span > < span class = "pl-s" > < span class = "pl-pds" > '< / span > ;< span class = "pl-pds" > '< / span > < / span > api/raw/< span class = "pl-k" > *< / span > .proto< / pre >
< / div >
2024-02-29 12:29:26 +00:00
< div class = "markdown-heading" >
< h2 class = "heading-element" >
< a href = "https://github.com/adrianlopezroche/fdupes" > fdupes< / a >
< / h2 >
2023-11-19 15:59:21 +00:00
< a
id="user-content-fdupes"
2024-03-08 08:12:41 +00:00
class="anchor"
2024-02-29 12:29:26 +00:00
aria-label="Permalink: fdupes"
2023-11-19 15:59:21 +00:00
href="#fdupes"
2024-02-29 12:29:26 +00:00
>< span aria-hidden = "true" class = "octicon octicon-link" > < /span
>< / a >
< / div >
2023-08-03 10:33:40 +00:00
< p > Remove duplicated files:< / p >
< div class = "highlight highlight-source-shell" >
< pre > fdupes -rdN < span class = "pl-c1" > .< / span > < / pre >
2023-06-30 18:06:13 +00:00
< / div >
2024-02-29 12:29:26 +00:00
< div class = "markdown-heading" >
< h2 class = "heading-element" >
< a href = "https://github.com/WayneD/rsync" > rsync< / a >
< / h2 >
2023-11-19 15:59:21 +00:00
< a
id="user-content-rsync"
2024-03-08 08:12:41 +00:00
class="anchor"
2024-02-29 12:29:26 +00:00
aria-label="Permalink: rsync"
2023-11-19 15:59:21 +00:00
href="#rsync"
2024-02-29 12:29:26 +00:00
>< span aria-hidden = "true" class = "octicon octicon-link" > < /span
>< / a >
< / div >
2023-08-03 09:22:08 +00:00
< div class = "highlight highlight-source-shell" >
< pre > < span class = "pl-c" > < span class = "pl-c" > #< / span > Result is dst/src< / span >
rsync -avzP src dst
< span class = "pl-c" > < span class = "pl-c" > #< / span > Result is dst/* with * is from src< / span >
rsync -avzP src/ dst< / pre >
< / div >
< p > Commonly flags:< / p >
< ul >
< li > < code > -v< / code > : verbose< / li >
< li > < code > -z< / code > : compress< / li >
< li >
< code > -P< / code > : enable both < code > --partial< / code > ,
2024-07-22 11:32:39 +00:00
< code > --progress< / code > to easily resume after interrupt
2023-08-03 09:22:08 +00:00
< / li >
< li > < code > -n< / code > : dry run< / li >
< / ul >
< p > Be careful flags (need dry run if not sure):< / p >
< ul >
< li >
< code > -u< / code > : skip if files in < strong > dst< / strong > is already newer
than in < strong > src< / strong > , if you want to sync both ways
< / li >
< li >
< code > --delete< / code > : delete files in < strong > dst< / strong > if not exist
in < strong > src< / strong > , useful to sync dst with src
< / li >
< / ul >
2024-02-29 12:29:26 +00:00
< div class = "markdown-heading" >
< h2 class = "heading-element" >
2024-09-21 11:00:32 +00:00
< a href = "https://github.com/FFmpeg/FFmpeg" > ffmpeg< / a >
2024-02-29 12:29:26 +00:00
< / h2 >
2023-11-19 15:59:21 +00:00
< a
2024-09-21 11:00:32 +00:00
id="user-content-ffmpeg"
2024-03-08 08:12:41 +00:00
class="anchor"
2024-09-21 11:00:32 +00:00
aria-label="Permalink: ffmpeg"
href="#ffmpeg"
2024-02-29 12:29:26 +00:00
>< span aria-hidden = "true" class = "octicon octicon-link" > < /span
>< / a >
< / div >
2023-07-30 11:13:08 +00:00
< div class = "highlight highlight-source-shell" >
2024-09-21 11:00:32 +00:00
< pre > < span class = "pl-c" > < span class = "pl-c" > #< / span > -crf: quality, 0 is lossless, more is lower quality< / span >
< span class = "pl-c" > < span class = "pl-c" > #< / span > -an: no audio < / span >
< span class = "pl-c" > < span class = "pl-c" > #< / span > -c:a aac -b:a 128k: audio codec and bitrate< / span >
ffmpeg -i input -c:v libx265 -crf 26 -preset fast -an output.mp4< / pre >
2023-08-03 10:33:40 +00:00
< / div >
2024-09-21 11:00:32 +00:00
< p > Links:< / p >
< ul >
< li >
< a href = "https://trac.ffmpeg.org/wiki/Encode/H.265" rel = "nofollow"
>H.265/HEVC Video Encoding Guide< /a
>
< / li >
< / ul >
2024-02-29 12:29:26 +00:00
< div class = "markdown-heading" >
< h2 class = "heading-element" >
2024-05-12 16:22:38 +00:00
< a href = "https://github.com/libvips/libvips" > libvips< / a >
2024-02-29 12:29:26 +00:00
< / h2 >
2023-11-19 15:59:21 +00:00
< a
2024-05-12 16:22:38 +00:00
id="user-content-libvips"
2024-03-08 08:12:41 +00:00
class="anchor"
2024-05-12 16:22:38 +00:00
aria-label="Permalink: libvips"
href="#libvips"
2024-02-29 12:29:26 +00:00
>< span aria-hidden = "true" class = "octicon octicon-link" > < /span
>< / a >
< / div >
2024-05-12 16:22:38 +00:00
< p > Convert:< / p >
2023-08-21 12:38:37 +00:00
< div class = "highlight highlight-source-shell" >
2024-05-13 05:14:40 +00:00
< pre > < span class = "pl-c" > < span class = "pl-c" > #< / span > Add --vips-progress to show progress< / span >
vips jxlsave filename.jpg filename.jxl --keep=none
2024-06-23 10:30:11 +00:00
vips jpegsave filename.png filename.jpg --keep=none
2024-05-12 16:22:38 +00:00
< span class = "pl-c" > < span class = "pl-c" > #< / span > Batch convert (require fd)< / span >
2024-06-23 10:30:11 +00:00
fd < span class = "pl-s" > < span class = "pl-pds" > "< / span > jpg|jpeg|png|webp|gif< span class = "pl-pds" > "< / span > < / span > --exec vips jxlsave {} {.}.jxl --keep=none
fd < span class = "pl-s" > < span class = "pl-pds" > "< / span > jpg|jpeg|png|webp|gif< span class = "pl-pds" > "< / span > < / span > --exec-batch rm
fd < span class = "pl-s" > < span class = "pl-pds" > "< / span > png|webp|gif< span class = "pl-pds" > "< / span > < / span > --exec vips jpegsave {} {.}.jpg --keep=none
fd < span class = "pl-s" > < span class = "pl-pds" > "< / span > png|webp|gif< span class = "pl-pds" > "< / span > < / span > --exec-batch rm
2024-05-13 05:14:40 +00:00
< span class = "pl-c" > < span class = "pl-c" > #< / span > Rotate< / span >
vips rot filename.jxl new_filename.jxl d90< / pre >
2024-02-08 17:13:49 +00:00
< / div >
2024-06-24 17:29:20 +00:00
< div class = "markdown-heading" >
< h2 class = "heading-element" >
< a href = "https://github.com/yt-dlp/yt-dlp" > yt-dlp< / a >
< / h2 >
< a
id="user-content-yt-dlp"
class="anchor"
aria-label="Permalink: yt-dlp"
href="#yt-dlp"
>< span aria-hidden = "true" class = "octicon octicon-link" > < /span
>< / a >
< / div >
< p > Download:< / p >
< div class = "highlight highlight-source-shell" >
< pre > yt-dlp -f - < span class = "pl-s" > < span class = "pl-pds" > "< / span > https://www.youtube.com/watch?v=video_id< span class = "pl-pds" > "< / span > < / span > < / pre >
< / div >
2024-09-21 11:00:32 +00:00
< div class = "markdown-heading" >
< h2 class = "heading-element" >
< a href = "https://github.com/ayoisaiah/f2" > F2< / a >
< / h2 >
< a
id="user-content-f2"
class="anchor"
aria-label="Permalink: F2"
href="#f2"
>< span aria-hidden = "true" class = "octicon octicon-link" > < /span
>< / a >
< / div >
< p > Rename:< / p >
< div class = "highlight highlight-source-shell" >
< pre > < span class = "pl-c" > < span class = "pl-c" > #< / span > If dry run, remove --exec< / span >
f2 --replace < span class = "pl-s" > < span class = "pl-pds" > "< / span > {mtime.YYYY}{mtime.MM}{mtime.DD}_{mtime.H}{mtime.mm}{mtime.ss}_{hash.md5}{ext}< span class = "pl-pds" > "< / span > < / span > --exec
< span class = "pl-c" > < span class = "pl-c" > #< / span > Include ImageSize (require exiftool)< / span >
f2 --replace < span class = "pl-s" > < span class = "pl-pds" > "< / span > {mtime.YYYY}{mtime.MM}{mtime.DD}_{mtime.H}{mtime.mm}{mtime.ss}_{xt.ImageSize}_{hash.md5}{ext}< span class = "pl-pds" > "< / span > < / span > --exec
< span class = "pl-c" > < span class = "pl-c" > #< / span > Not include time< / span >
f2 --exclude=< span class = "pl-s" > < span class = "pl-pds" > "< / span > \d+x\d+_[a-z\d]{32}< span class = "pl-pds" > "< / span > < / span > --sort=mtime --replace < span class = "pl-s" > < span class = "pl-pds" > "< / span > {xt.ImageSize}_{hash.md5}{ext}< span class = "pl-pds" > "< / span > < / span > --exec
< span class = "pl-c" > < span class = "pl-c" > #< / span > Remove space in directory< / span >
f2 --find < span class = "pl-s" > < span class = "pl-pds" > "< / span > < span class = "pl-pds" > "< / span > < / span > --replace < span class = "pl-s" > < span class = "pl-pds" > "< / span > _< span class = "pl-pds" > "< / span > < / span > --string-mode --only-dir --exec< / pre >
< / div >
2023-06-30 18:06:13 +00:00
< div >
Feel free to ask me via
< a href = "mailto:hauvipapro+posts@gmail.com" > email< / a > or
2023-08-20 17:29:13 +00:00
< a rel = "me" href = "https://hachyderm.io/@haunguyen" > Mastodon< / a > .
< br / > Source code is available on
2023-06-30 18:06:13 +00:00
< a href = "https://github.com/haunt98/posts-go" > GitHub< / a >
2023-08-20 17:29:13 +00:00
< a href = "https://codeberg.org/yoshie/posts-go" > Codeberg< / a >
< a href = "https://git.sr.ht/~youngyoshie/posts-go" > sourcehut< / a >
< a href = "https://gitea.treehouse.systems/yoshie/posts-go" > Treehouse< / a >
< a href = "https://gitlab.com/youngyoshie/posts-go" > GitLab< / a >
2023-06-30 18:06:13 +00:00
< / div >
< / body >
< / html >