Based on:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Define variables | |
SRCDIR := . | |
DOTFILES := $(shell find $(SRCDIR) -type f -name '*.dot') | |
PUMLFILES := $(shell find $(SRCDIR) -type f -name '*.puml') | |
MERMAIDFILES := $(shell find $(SRCDIR) -type f -name '*.mmd') | |
PNGFILES := $(DOTFILES:.dot=.png) $(PUMLFILES:.puml=.png) $(MERMAIDFILES:.mmd=.png) | |
DOT := dot | |
PLANTUML := java -jar plantuml-1.2023.4.jar | |
MERMAID := mmdc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
# Function to create fixup commits for changed files | |
create_fixup_commits() { | |
target_branch="${1:-origin/develop}" | |
# Get the list of changed files | |
changed_files=$(git diff --name-only) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -o nounset # abort on unbound variable | |
set -o pipefail # don't hide errors within pipes | |
# Define usage function | |
usage() { | |
cat <<EOF | |
Usage: $(basename "${BASH_SOURCE[0]}") [-k|--keep] [--recursive] [--force] [--dry-run] INPUT_DIR [OUTPUT_DIR] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
((_w) => { | |
const _d = _w.document; | |
if (!_d.querySelector('#speeder')) { | |
const getSpeed = s => s/10 | |
let speed = 15; | |
let speedEl = document.createElement("span"); | |
speedEl.id = 'speeder'; | |
speedEl.innerText = ` ${getSpeed(speed)}x`; | |
_d.querySelector('#channel-link > span').appendChild(speedEl); | |
_d.querySelectorAll('video').forEach(v => v.playbackRate = getSpeed(speed)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
list = document.querySelector('.container > div:nth-child(2)'); [...list.children] | |
.sort((a,b)=>a.querySelector('.kngppJ').innerText<b.querySelector('.kngppJ').innerText?1:-1) | |
.forEach(node=>list.appendChild(node)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://go.dev/play/p/JSWYXbjHBlM | |
package main | |
import "fmt" | |
type Fruit struct { | |
name string | |
color string | |
shape string | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://go.dev/play/p/xmai9kPOwl3 | |
// Function composition with go | |
// You can edit this code! | |
// Click here and start typing. | |
package main | |
func main() { | |
example() | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a href="javascript:(function(){Array.from(document.querySelectorAll('textarea')).map(function(b){var a=document.createElement('div');var d=document.createElement('button');d.textContent='↑';d.addEventListener('click',function(f){f.preventDefault();b.value=Array.from(new Set(b.value.split('\n'))).sort().join('\n')});var c=document.createElement('button');c.textContent='↓';c.addEventListener('click',function(f){f.preventDefault();b.value=Array.from(new Set(b.value.split('\n'))).sort().reverse().join('\n')});a.appendChild(d);a.appendChild(c);b.parentNode.insertBefore(a,b)})})();">Sort textarea unique</a> |
NewerOlder