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
#IfWinActive, ahk_class POEWindowClass | |
active:=true | |
`:: | |
active:=!active | |
return | |
$2:: | |
if(!active) { | |
send, 2 |
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 -o errexit | |
# Author: David Underhill | |
# Script to permanently delete files/folders from your git repository. To use | |
# it, cd to your repository's root and then run the script with a list of paths | |
# you want to delete, e.g., git-delete-history path1 path2 | |
if [ $# -eq 0 ]; then | |
exit 0 |
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
export function uuid7(): UUID { | |
// Simple implementation using built in gen_random_uuid() | |
// gen_random_uuid(): '4047541d-a7bf-4d8a-87c2-585cab7ef52e' | |
// strip random head and version: '_______________d8a-87c2-585cab7ef52e' | |
// concatenate epoch and version 7: 'xxxxxxxx-xxxx-7d8a-87c2-585cab7ef52e | |
const v4 = uuid.v4().slice(8 + 4 + 2 + 1, 36); | |
const date = Date.now().toString(16).padStart(12, '0'); | |
return date.slice(0, 8) + '-' + date.slice(8, 8 + 5) + '-7' + v4; | |
} |
OlderNewer