Snippets
SNP 001–148
Loosely organized collection of code snippets. Maybe you'll find something useful here.
Showing 20 of 148 snippets
-
SNP 028
#945
Python virtual environments
Keep every project's packages to itself.
-
SNP 027
#4B7
Change the last commit message
Fix a typo in the commit message you just wrote.
-
SNP 026
#513
Crisp pixel art in CSS
Browsers smooth scaled images by default, which turns pixel art into mush. One line fixes it.
-
SNP 025
#A42
Clean up Docker disk space
Docker quietly ate 40 GB of my disk. Here is how to get it back.
-
SNP 024
#936
Find duplicate rows in SQL
Which emails are in the users table more than once?
-
SNP 023
#159
SSH config aliases
Stop typing [email protected] -p 2222 every single time.
-
SNP 022
#B31
Debounce a function in plain JavaScript
Run a function only after the user stopped typing, without pulling in a library for it.
-
SNP 021
#24B
Find the largest files and folders on linux
The disk is full again. Here is how to find what is eating it.
-
SNP 020
#614
Undo the last commit but keep the changes
Committed too early? Take the commit back without losing any work.
-
SNP 019
#395
Kill the process that is using a port
Find out what is squatting on port 3000 and get rid of it.
-
SNP 018
#35B
LLM Prompt for refactoring your codebase using best practices
Sometimes you just want to have better and more maintainable code.
-
SNP 017
#924
Auto order episodes of Buffy the Vampire Slayer and Angel
Order the episodes of Buffy the Vampire Slayer and Angel automatically to the "best viewing order"
-
SNP 016
#156
Solve Bitbucket SSH-RSA connection issue
How to solve permission denied or no mutual signature algorithm errors while connecting to Bitbucket.
-
SNP 015
#B96
Create timeout in an async function
To throttle the execution of our async function we will create a timeout method.
-
SNP 014
#52B
Auto mount Samba share on startup in Manjaro
Mount your Samba network share on startup. It even works when you are using WiFi.
-
SNP 013
#249
Get query parameters in Nuxt
Read the GET request query parameters in your code.
-
SNP 012
#951
Concat IDs into a single field in SQL
Here is how to merge multiple SQL rows into one, values separated by a comma.
-
SNP 011
#419
Add more VSFTPD virtual user accounts
How to add more virtual user accounts to your VSFTPD on linux.
-
SNP 010
#2B1
Mount samba share on Ubuntu 20.04 server
How to mount samba shares on the latest Ubuntu LTS release.
-
SNP 009
#65B
Compress and extract TAR files on linux
How to compress and extract TAR files on linux with gzip easily.
No snippets match this filter.