Skip to content

Instantly share code, notes, and snippets.

View kylehughes's full-sized avatar
🐶
Updog

Kyle Hughes kylehughes

🐶
Updog
View GitHub Profile
@kylehughes
kylehughes / dataview_table_column-reflow.css
Created May 21, 2023 00:13
CSS for Dataview in Obsidian to give maximum width to the first column, prevent all columns from wrapping, and truncate the first column when necessary.
.table-view-table {
width: 100%;
}
.table-view-table td:not(:first-child) {
white-space: nowrap;
}
.table-view-table tr td:first-child, tr th:first-child {
overflow: hidden;
@kylehughes
kylehughes / TornRectangle.swift
Last active August 12, 2023 01:20
A rectangle shape for SwiftUI that can render any edge like a torn piece of paper.
// Copyright 2021 Kyle Hughes
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
// documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
// Software.
//
@kylehughes
kylehughes / MockNSUbiquitousKeyValueStore.swift
Created April 29, 2024 04:52
Subclass of NSUbiquitousKeyValueStore suitable for use in unit tests.
// Copyright 2024 Kyle Hughes
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
// documentation files (the "Software"), to deal in the Software without restriction, including without limitation the
// rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
// permit persons to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the
// Software.
//