Skip to content

Instantly share code, notes, and snippets.

View piouPiouM's full-sized avatar
🪄
Tweaking my Neovim configuration

Mehdi Kabab piouPiouM

🪄
Tweaking my Neovim configuration
View GitHub Profile
@bennewton999
bennewton999 / dailyNoteTemplate.txt
Last active April 25, 2024 12:40
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 July 13, 2023 16:08
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 April 12, 2024 13:24
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")
@msand
msand / svg-css-inliner-color-hexer-gradient-defs-grouper-number-formatter.js
Last active May 26, 2021 18:17
Convert Illustrator SVG export into cross-platform CSS independent mode. CSS rule and style inlining, group gradients into a definitions tag, remove elements with display set to none, make colors hex. Works with react-native-web react-native-svg and svgs to give cross-platform web and native mobile rendering of any SVG produced in Illustrator.
/*
Open console.
(Import https://raw.githubusercontent.com/MikeMcl/decimal.js/master/decimal.js first if you want/need number formatting)
Then copy & paste this + enter, to run this.
Copy console output to a NewFile.js or NewFile.jsx file.
prettier --write NewFile.js
*/
/* eslint no-console: ["error", { allow: ["log"] }] */
/* global document, Decimal*/
(() => {