Skip to content

Instantly share code, notes, and snippets.

View piouPiouM's full-sized avatar
🪄
Tweaking my dotfiles

Mehdi Kabab piouPiouM

🪄
Tweaking my dotfiles
View GitHub Profile
@gdarchen
gdarchen / set-saved-replies.js
Last active May 12, 2026 08:08
Conventional Gitmoji review comments
(async function generateReplies(document) {
/**
* Those saved replies are a mix of the "conventional comments" and the
* "code review emoji guide".
* Refer to the following resources:
* - https://conventionalcomments.org
* - https://github.com/axolo-co/code-review-emoji-guide
*/
const LABEL = {
@bennewton999
bennewton999 / dailyNoteTemplate.txt
Last active October 22, 2025 05:41
My current Daily Note Template in Obsidian utilizing Templater and DataView Plugins
---
creation date: <% tp.file.creation_date() %>
tags: DailyNote <% tp.file.title.split('-')[0] %>
---
modification date: <%+ tp.file.last_modified_date("dddd Do MMMM YYYY HH:mm:ss") %> // This doesn't currently work in front matter, hoping that gets fixed.
# <% tp.file.title %>
<< [[<% tp.date.now("YYYY-MM-DD", -1, tp.file.title, "YYYY-MM-DD") %>]] | [[<% tp.date.now("YYYY-MM-DD", 1, tp.file.title, "YYYY-MM-DD") %>]]>>

ZSH CheatSheet

This is a cheat sheet for how to perform various actions to ZSH, which can be tricky to find on the web as the syntax is not intuitive and it is generally not very well-documented.

Strings

Description Syntax
Get the length of a string ${#VARNAME}
Get a single character ${VARNAME[index]}
@gkeep
gkeep / iceberg_light.conf
Last active November 11, 2022 09:17
Iceberg light theme for kitty terminal
background #e8e9ec
foreground #33374c
selection_background #d2d4dd
selection_foreground #33374c
cursor #33374c
cursor_text_color #e8e9ec
# white
@gkeep
gkeep / iceberg_dark.conf
Last active April 4, 2026 17:37
Iceberg dark theme for kitty terminal
background #161821
foreground #c6c8d1
selection_background #1e2132
selection_foreground #c6c8d1
cursor #d2d4de
# black
color0 #161821
@nfarina
nfarina / AutoThemeSwitcher.js
Created May 14, 2019 19:04
Auto Dark Theme for Storybook
import addons from '@storybook/addons';
import { FORCE_RE_RENDER } from '@storybook/core-events';
import { themes } from '@storybook/theming';
// Automatically switch light/dark theme based on system pref.
addons.register("auto-theme-switcher", api => {
const prefersDark = window.matchMedia('(prefers-color-scheme: dark)');
let lastTheme;
@laggardkernel
laggardkernel / startup-time-of-zsh.md
Last active July 13, 2026 23:40
Comparison of ZSH frameworks and plugin managers

Comparison of ZSH frameworks and plugin managers

Changelog

  • update 1: add a FAQ section
  • update 2: benchmark chart and feature comparison table
  • update 3:
    • improve the table with missing features for antigen
    • new zplg times result

TLDR

@echiesse
echiesse / maybeMonad.lua
Last active June 20, 2023 07:41
Lua implementation of Maybe Monad.
-- The Maybe Monad:
local NOTHING = { val = nil }
maybe = {}
maybe.__index = maybe
-- Constructors:
maybe.just = function(val)
local obj = setmetatable({ val = val }, maybe)
@apiraino
apiraino / pwd_exporter.py
Created January 23, 2018 21:19
Convert XML file from Firefox (pre-Quantum) extension --> Keepass import CSV
#!/usr/bin/env python3
# Convert XML file from the firefox (pre-Quantum) extension
# into a CSV suitable to be imported into keepassxc
# Notes:
# - Python3 only!
# - password must be exported in plain text
# - requires defusedxml package ("pip install defusedxml")