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 / 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