This file contains 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
; Extend Layer | |
; Based on https://dreymar.colemak.org/layers-extend.html | |
#Requires AutoHotkey v2.0 | |
#SingleInstance Force | |
SetCapsLockState("AlwaysOff") | |
#HotIf GetKeyState("CapsLock", "P") | |
; Modifiers |
This file contains 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
ColumnLimit: 80 | |
ContinuationIndentWidth: 2 | |
IndentWidth: 2 | |
TabWidth: 2 | |
ConstructorInitializerIndentWidth: 2 | |
IndentCaseLabels: true | |
UseTab: Never | |
SortIncludes: true | |
SortUsingDeclarations: false | |
AlignConsecutiveMacros: false |
This file contains 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
import { readdirSync, rmdirSync, statSync } from 'node:fs' | |
import { join } from 'node:path' | |
export const cleanupEmptyFolders = (folder) => { | |
if (!statSync(folder).isDirectory()) return | |
let files = readdirSync(folder) | |
if (files.length > 0) { | |
files.forEach((file) => cleanupEmptyFolders(join(folder, file))) | |
// Re-evaluate files; after deleting subfolders we may have an empty parent |
This file contains 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
const path = new Path.Circle({ | |
radius: 200, | |
strokeColor: 'blue', | |
center: view.center, | |
strokeCap: 'round', | |
strokeWidth: 3 | |
}) | |
const gap = 50 | |
const offsets = [] |
This file contains 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
const getBottomSegment = (segments) => | |
segments.reduce((prev, curr) => (curr.point.y > prev.point.y ? curr : prev)) | |
const getTopSegment = (segments) => | |
segments.reduce((prev, curr) => (curr.point.y < prev.point.y ? curr : prev)) | |
const wrapSegmentIndex = (path, index) => | |
(index = | |
index < 0 ? path.segments.length + index : index % path.segments.length) |
This file contains 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
-- Inspired by: lua-users.org/wiki/SimpleLuaClasses | |
function class(base) | |
local c = {} | |
-- Inherit base by making a shallow copy. | |
if type(base) == 'table' then | |
for key,value in pairs(base) do c[key] = value end | |
c._base = base | |
end |