| 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
| /target |
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
| -- | |
| local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" | |
| if not (vim.uv or vim.loop).fs_stat(lazypath) then | |
| local lazyrepo = "https://github.com/folke/lazy.nvim.git" | |
| local out = vim.fn.system({ "git", "clone", "--filter=blob:none", "--branch=stable", lazyrepo, lazypath }) | |
| if vim.v.shell_error ~= 0 then | |
| vim.api.nvim_echo({ | |
| { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, | |
| { out, "WarningMsg" }, |
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
| #!/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 |
Note: This gist is now part of VimBits plugin.
As a Vim user, you might prefer the new vim9script over the legacy script, and wish to use it in the command line. While there's no direct option to switch the command line to parse vim9script, you can execute vim9script commands by simply prepending each command with vim9.
However, remember that execution occurs in the global context, not the script-local context. This means you need to declare variables with the g: prefix, like g:foo = 'bar'.
Common commands such as visual mode select ('<,'>), shell commands (!), substitution (s//), and global (g//) work as expected, even with vim9 prepended.
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 userscript brings back the Maps button in Google Search results, making it easy to search locations directly in Google Maps.
- Adds a Maps button next to the "All", "Images", "News" tabs in Google Search
- Works across multiple Google domains (.com, .co.uk, .nl, .de, .fr)
- Automatically updates when using Google's dynamic search
- Maintains button presence during navigation
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" |