Command | Description |
---|---|
cd - |
🔙 Teleport to previous directory |
pushd <dir> |
📚 Change directory, save current to stack |
popd |
📚 Return to most recently pushed directory |
cd ~ |
🏠 Go to home directory |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# rename-pictures.sh | |
# Author: Justine Tunney <[email protected]> | |
# License: Apache 2.0 | |
# | |
# This shell script can be used to ensure all the images in a folder | |
# have good descriptive filenames that are written in English. It's | |
# based on the Mistral 7b and LLaVA v1.5 models. | |
# | |
# For example, the following command: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vim9script | |
# Translation into Vim 9 script of the tutorial at: | |
# https://dev.to/ryansolid/building-a-reactive-library-from-scratch-1i0p | |
# Helper functions and classes {{{ | |
def IndexOf(items: list<any>, item: any): number | |
return indexof(items, (_, e) => e is item) | |
enddef |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
URL_FIFO=$HOME/Downloads/ff_fifo | |
mkfifo "$URL_FIFO" | |
ffscript=$(mktemp) | |
cat > "$ffscript" << EOF | |
#!/bin/bash | |
echo "Creating profile" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To generate mitm cert and key: | |
# openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -passout pass:"third-wheel" -subj "/C=US/ST=private/L=province/O=city/CN=hostname.example.com" | |
# see: https://github.com/campbellC/third-wheel | |
[package] | |
name = "http-ytproxy" | |
version = "0.1.0" | |
edition = "2021" | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# check for one-time codes coming as notifications via KDE connect and copy them to clipboard | |
# requirements: qdbus(qt-tools), dbus-monitor, kde-connect, klipper | |
# the script must be run in user session | |
set -euo pipefail | |
shopt -s lastpipe | |
if [[ $# -eq 0 ]] | |
then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vim9script | |
def GetWord() | |
var word_under_cursor = expand('<cword>') | |
var result = system('dict -d wn ' .. word_under_cursor) | |
execute 'vnew' | |
setlocal buftype=nofile | |
setlocal bufhidden=hide |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vim9script | |
# https://vimhelp.org/vim9.txt.html | |
set nocompatible | |
if has("mac") | |
set clipboard=unnamed | |
else | |
set clipboard=unnamedplus # requires vim-gui-common | |
endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/target |