Skip to content

Instantly share code, notes, and snippets.

View mathmul's full-sized avatar
🤓
Always trying to learn stuff

Matej mathmul

🤓
Always trying to learn stuff
View GitHub Profile
@mathmul
mathmul / llR.zsh
Last active April 6, 2025 13:46
similar to 'll' or 'ls -la', but it finds nested files/directories as well
function llR() {
# Recursive ll
#
# Description:
# Lists files and directories similar to how 'ls -la' does. Differences:
# - lists files and directories recursively as well
# - lists full paths
# - accepts second argument as a comma separated list of dirs, that should not be explored deeper
# - '-h' flag gives human readable sizes same as with 'ls' command, but '-H' flag makes it more human readable, eg., '12K' vs '12 KB'
@mathmul
mathmul / JiraTitleToClipboard.js
Created July 9, 2024 00:04
Convert Jira Task Title to a git branch name and copy to clipboard
/*
Played around so it works from DevTools console too.
EDIT:
After making this I went and wrote an extension for Chromium based browsers "Jira Task Title to Git Branch (Clipboard)"
Its code is totally free for abuse: https://github.com/mathmul/chr-ext-jira-task-title-to-git-branch
*/
await (async function copyBranchNameToClipboard(branchType = 'feature', timeToFallbackMethod = Infinity) {
const getJiraTaskKey = () =>
@mathmul
mathmul / text-to-led-display.php
Last active December 2, 2021 10:36
[PHP] Display text on a bus LED display
<?php
/**
* @author S3C_MM
* @license Free to use in anyway you wish.
* @phpversion 8.x
*
* NOTES:
* - For earlier PHP versions replace match expression in map_to_instructions function to switch statement.
* - If mbstring not compiled with PHP, replace mb_str_split with str_split