Skip to content

Instantly share code, notes, and snippets.

@ebanDev
ebanDev / 2-foldercover.lua
Last active September 2, 2025 00:26
FolderCover patch for KOReader
--[[
FolderCover patch for KOReader (v3.0)
========================================
Features:
- Automatically detects cover images in directories
- Supports multiple image formats (jpg, jpeg, png, webp, gif)
- Configurable folder name and file count display with positioning options
- Rounded corners and proper image cropping
- Settings integration with BookInfoManager
@elie222
elie222 / my-vs-code-snippets.json
Last active September 2, 2025 00:23
Favourite VS Code Snippets
{
"Export default": {
"scope": "javascript,typescript,javascriptreact,typescriptreact",
"prefix": "eid",
"body": [
"export { default } from './${TM_DIRECTORY/.*[\\/](.*)$$/$1/}'",
"$2"
],
"description": "Import and export default in a single line"
},
@muendelezaji
muendelezaji / bash-to-zsh-hist.py
Created October 5, 2016 14:18 — forked from op/bash-history-to-zsh-history.py
Convert Bash history to Zsh history
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This is how I used it:
# $ cat ~/.bash_history | python bash-to-zsh-hist.py >> ~/.zsh_history
import sys
import time
@hilarex
hilarex / .aliases
Created June 16, 2025 20:39
Alias to delete all docker ressources that match a pattern
docker-del() {
# If not run as root, re-run the function with sudo
if [[ $EUID -ne 0 ]]; then
echo "Re-running with sudo..."
sudo bash -c "$(declare -f docker-del); docker-del $1"
return 0
fi
# Make sure a container name is provided
if [[ -z "$1" ]]; then
@Asjas
Asjas / reset.css
Created May 19, 2021 07:09
Modern CSS Reset - Andy Bell
// https://piccalil.li/blog/a-modern-css-reset
/* Box sizing rules */
*,
*::before,
*::after {
box-sizing: border-box;
}
/* Remove default margin */
@andrew8088
andrew8088 / learn-typescript.ts
Created June 3, 2023 22:50
how i learn typescript
type Tables = {
person: {
id: number;
first_name: string;
},
product: {
id: string;
name: string;
createdAt: Date
}
@faustinoaq
faustinoaq / help.md
Last active September 2, 2025 00:03
Recover ZFS boot disk in Ubuntu 22.04.4

Recovery

TL;DR: for some weird reason zfs was not being loaded in grub, maybe related to this bug?

ATTENTION: I copy pasted some things from my memory so, some things may be mistyped or wrong, proceed with caution or leave a comment ⚠️

insmod zfs
zfs-bootfs (hd1,gpt3) # or whatever is your structure
@pesader
pesader / starship.toml
Last active September 2, 2025 00:02
[Display toolbx information on starship prompt] Show distro and container name on the shell prompt #starship #toolbox #podman
[custom.toolbox]
description = "The activated toolbox container"
command = "echo $(. /var/run/.containerenv; echo ${name}: ${DISTTAG%container})"
when = """ [[ -f /run/.containerenv && -f /run/.toolboxenv ]] """
style = "bold red"
format = "[\\[$output\\]]($style) "
disabled = false
@mohit0749
mohit0749 / GooglePhotosTakeoutHelper.py
Last active September 2, 2025 00:02
GooglePhotosTakeoutHelper
directory = '/path/to/photos'
output_directory = '/path/to/output_directory'
bin_directory = '/path/to/trash_directory'
import json
import os
import shutil
from datetime import datetime
@juancsr
juancsr / mac-docker-withot-docker-destop.md
Last active September 2, 2025 00:01
Use docker in mac without docker-