Why is the colon so special? Read here: https://planetozh.com/blog/2026/06/allowing-weird-characters-in-yourls-short-urls/
Keeps the global "X links, Y clicks" counts on the YOURLS admin dashboard exact and cheap on large installs.
On a big table, the dashboard query
SELECT COUNT(keyword), SUM(clicks) FROM yourls_url scans the whole table and
can time out. A plain cache is not enough: every link add or delete would force
a fresh scan, which times out again (and a timed-out scan caches nothing, so the
dashboard stays broken on every reload).
Instructions for Claude Code working on the YOURLS codebase.
YOURLS (Your Own URL Shortener) is a self-hosted, open-source PHP URL shortener. Primary target: shared hosting (no root/sudo), MySQL 5.5+, PHP 8.1+. WordPress-inspired architecture: hook/filter system, options table, plugin API.
- Never commit.
- All functions are prefixed
yourls_+ snake_case description, e.g.yourls_do_this_task.
This script runs bunx prettier --check against all files
committed in a branch that differ from main (git diff main...HEAD).
Having --diff-filter=AM means "only Added and Modified" (not deleted)
Workflow:
- modify, commit
- check with this script (
bash script.shfrom repo root) - edit last line from
--checkto--writeif wanting to "fix" - push
In your .bashrc or alias/functions definitions:
cdhere() {
# Get all Nemo window IDs
nemo_ids=$(xdotool search --classname nemo)
# Get stacking order (last = most recently focused)
stacking=$(xprop -root _NET_CLIENT_LIST_STACKING \
| grep -oP '0x[0-9a-f]+' \Double-click a .php file in Nemo: this setup opens it in PhpStorm only
if PhpStorm is already running, or falls back to Geany otherwise.
The idea is that whenever I just want a quick edit, I don't want to load PhpStorm. And whenever I'm really coding, PhPStorm is already open.
Right-click any file, folder, or the background of a Nemo window inside a git repository to open a diff in Meld.
- Right-click a file - diff that file
- Right-click a folder icon - diff the contents of that folder
- Right-click the empty area of a Nemo window - diff the contents of the current directory
G: sends the current page URL to Google to perform a reverse image search:
javascript:%20(function%20()%20%7Burl%20=%20location.href;location.href%20=%20'https://www.google.com/searchbyimage?&image_url='+url;%7D());R: cleans up links on a page (notably from Google) by removing redirect/tracking wrappers and restoring the direct URLs
javascript:(function(){var%20k,x,t,i,j,p;%20for(k=0;x=document.links[k];k++){t=x.href.replace(/[%]3A/ig,':').replace(/[%]2f/ig,'/');i=t.lastIndexOf('http');if(i>0){%20t=t.substring(i);%20j=t.indexOf('&');%20if(j>0)t=t.substring(0,j);%20p=/https?\:\/\/[^\s]*[^.,;'">\s\)\]]/.exec(unescape(t));%20if(p)%20x.href=p[0];%20}%20else%20if%20(x.onmouseover&&x.onmouseout){x.onmouseover();%20if%20(window.status%20&&%20window.status.indexOf('://')!=-1)x.href=window.status;%20x.onmouseout();%20}%20x.onmouseover=null;%20x.onmouseout=null;%20}})();| FROM php:8.5-apache | |
| # ------------------------- | |
| # System dependencies | |
| # ------------------------- | |
| RUN apt-get update && apt-get install -y \ | |
| git \ | |
| unzip \ | |
| curl \ | |
| ca-certificates \ | |
| libzip-dev \ |