Skip to content

Instantly share code, notes, and snippets.

View theY4Kman's full-sized avatar

Zach Kanzler theY4Kman

View GitHub Profile
@theY4Kman
theY4Kman / BranchChangedFileLocalLineStatusTracker.kt
Created May 27, 2023 07:52
Branch Changed Files line status tracker
package com.github.rewstapp.packauthoring.openapi.vcs.impl
import com.github.rewstapp.packauthoring.psi.search.scope.packageSet.BranchChangedFilesCustomScopesProvider
import com.github.rewstapp.packauthoring.settings.PackAuthoringSettings
import com.intellij.diff.DiffApplicationSettings
import com.intellij.diff.DiffContentFactory
import com.intellij.diff.DiffManager
import com.intellij.diff.comparison.ByWord
import com.intellij.diff.comparison.ComparisonPolicy
import com.intellij.diff.contents.DiffContent
@theY4Kman
theY4Kman / pg-table-sizes.sql
Created October 15, 2023 06:03
Show sizes of all tables in the public schema, itemized for tablespace alone, indexes size, and TOAST size
-- Sizes of all tables in the public schema
SELECT
table_name AS "Table",
pg_size_pretty(table_size) AS "Table Size",
pg_size_pretty(indexes_size) AS "Indexes Size",
pg_size_pretty(toast_size) AS "Toast Size",
pg_size_pretty(total_size) AS "Total Size"
FROM (
SELECT
table_name,
@theY4Kman
theY4Kman / codewars-minesweeper.py
Created November 21, 2024 04:53
Original, uncleaned, log-spewing solution for Codewars Minesweeper kata: https://www.codewars.com/kata/57ff9d3b8f7dda23130015fa/train/python
from __future__ import annotations
from collections import defaultdict
from dataclasses import dataclass, field
from typing import Iterable, Self
from preloaded import open