Skip to content

Instantly share code, notes, and snippets.

View viktorbezdek's full-sized avatar

Viktor Bezdek viktorbezdek

View GitHub Profile
@viktorbezdek
viktorbezdek / document-ai-setup.md
Last active April 2, 2026 09:58
Document your personal Claude Code / AI setup on macOS — no dependencies, just bash + python3

Document Your Personal AI Setup

What this does

Generates a comprehensive markdown report of your Claude Code / Claude Desktop configuration on macOS — including installed skills, agents, MCP servers, backup configs, session analytics, and an AI usage profile.

How to run

Open Terminal and paste this:

type Cell = 0 | 1;
type Grid = Cell[][];
// Utility to transpose a matrix (swap rows and columns)
const transpose = <T>(grid: T[][]): T[][] =>
grid[0].map((_, i) => grid.map(row => row[i]));
// Create a function to get neighboring cells of a given coordinate
const neighbors = (grid: Grid) => ([x, y]: [number, number]): [number, number][] =>
[-1, 0, 1]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This formula ensures that each logo will occupy the same area, making them appear visually identical in size.

$$[ \text{New Height} = \left( \frac{\text{Target Area}}{\text{Original Width}} \right)^{0.5} ]$$

$$[ \text{New Width} = \text{Original Width} \times \left( \frac{\text{New Height}}{\text{Original Height}} \right) ]$$

@viktorbezdek
viktorbezdek / GameOfLife.ts
Created July 14, 2023 10:00
Functional TypeScript Conway's Game of Life
// Conway's Game of Life in functional TypeScript
// Game board size
const ROWS = 10;
const COLS = 10;
// Game board represented as 2D array
type Board = boolean[][];
// Create empty board
const _ = require("lodash/fp")
const sample = Array.from({ length: 90000 }).map((_, i) => i)
var nativeStart
var nativeDuration
;(() => {
nativeStart = process.hrtime.bigint()
for (let x = 0; x <= 10000; x++) {
sample.map((n) => n * 2)
'use strict';
const MD5 = (str) => {
const currentNick = M(V(Y(X(str), 8 * str.length)));
return currentNick.toLowerCase();
};
/**
* @param {string} b
* @return {?}
*/
function M(b) {
@viktorbezdek
viktorbezdek / OrgTeams.gql
Created January 10, 2023 07:42
Github GraphQL API queries
query OrgTeams($org: String!) {
organization(login: $org) {
teams(first: 100) {
pageInfo {
endCursor
hasNextPage
}
nodes {
name
}
@viktorbezdek
viktorbezdek / slightly-functional-conways-game-of-life.js
Last active October 2, 2022 16:55
Slightly Functional Game of Life
function boardGet(arr, i, j) {
if (i < 0 || j < 0 || i >= arr.length || j >= arr[i].length) {
return 0
}
return arr[i][j]
}
function countNeighbors(board, i, j) {
return (
@viktorbezdek
viktorbezdek / imperative-conways-game-of-life.js
Last active October 2, 2022 16:54
Imperative Game of Life
function conwaysGameOfLife(board) {
var newBoard = []
for (var i = 0; i < board.length; i++) {
newBoard.push([])
for (var j = 0; j < board[i].length; j++) {
newBoard[i].push(0)
}
}
for (var i = 0; i < board.length; i++) {