Skip to content

Instantly share code, notes, and snippets.

@zdunecki
zdunecki / How I manage my Google Chrome tabs and you should too.md
Created August 21, 2025 12:23
How I manage my Google Chrome tabs and you should too

Intro

Since the Google Chrome update of tab groups, I always use them. I use the whole default available palette, which draws like this:

{% katex %} \colorbox{#e2e3e5}{\color{#e2e3e5}{X}} \colorbox{#fff}{\color{#000000}{tools}} \colorbox{#3871e0}{\color{#3871e0}{X}} \colorbox{#fff}{\color{#000000}{infra}} \colorbox{#c84031}{\color{#c84031}{X}} \colorbox{#fff}{\color{#000000}{watch}} \colorbox{#eeae3c}{\color{#eeae3c}{X}} \colorbox{#fff}{\color{#000000}{branch}} \colorbox{#3c7e40}{\color{#3c7e40}{X}} \colorbox{#fff}{\color{#000000}{suite}}

@zdunecki
zdunecki / How I got over 13M lines of code within 182 commits in my side project.md
Last active August 20, 2025 12:38
How I got over 13M lines of code within 182 commits in my side project

🔗 My Git Activity Story Repo: https://github.com/livesession/xyd

TL;DR — Highlights ⚡

  • 🗓️ Range: Dec 01, 2024 → Aug 19, 2025 • 262 days
  • 🧑‍💻 Commits: 182 • Active days: 108 (41.2%)
  • 🧾 Raw lines: ~13.8M (exact: 13,785,977) (+~7.3M (exact: 7,341,870) / -~6.4M (exact: 6,444,107))
  • 🏆 Spike #1: May 25, 2025 — ~4.0M (exact: 3,998,050) (JSON/YAML (any) 97.9% • Tests 99.8%)
  • 🔥 Longest streak: 108 days • ⏰ Fav hours: 23:00 (75 commits), 22:00 (14 commits), 03:00 (10 commits)
  • 🧼 Baseline (cleaned): excludes only the exact spike-causing tests/fixtures JSON/YAML; median 3,821/day, p90 46,572/day, avg 8,955.3 lines/commit
@zdunecki
zdunecki / livesession.client.tsx
Last active September 30, 2024 20:31
LiveSession + Next.js
"use client"
// pages/_app.js
import { useEffect } from "react"
import ls from "@livesession/sdk"
// Check if LiveSession is client-side (used to handle Next.js SSR)
if (typeof window !== 'undefined') {
ls.init(process.env.NEXT_PUBLIC_LIVESESSION_TRACK_ID, {
// SDK options (https://github.com/livesession/livesession-sdk)
@zdunecki
zdunecki / page.tsx
Created August 4, 2024 12:59
Lyticsman + Next.js
import {AreaChart, Card} from "@tremor/react";
import {charts} from "@livesession/lyticsman";
import qx from "@livesession/qx";
export default async function Home() {
const query = qx()
.range("TODAY-30DAYS", qx.today)
.where(
qx.session.website_id.eq("dab02d0a"),
qx.session.duration.gt(100)
<entryFree>
<quote>aduocatum</quote>
<num>1382</num>
<title>PdLw</title>
<biblScope unit="volume">I</biblScope>
<num>1</num>
<pc>;</pc>
<quote>Iohannes Amen</quote>
<num>1383</num>
@zdunecki
zdunecki / main.go
Last active January 16, 2023 12:17
First Sort data structure
package main
import "fmt"
func push(arr *[]int, elements... int) {
for i, v := range elements {
fmt.Println(i)
if len(*arr) <= 0 {
*arr = append(*arr, v)
} else {
a := *arr
@zdunecki
zdunecki / TestTemplateCompositionStruct.go
Created October 24, 2022 10:40
Check composition variables in go template engine
func TestTemplateCompositionStruct(t *testing.T) {
type Deep struct {
Name string
}
type M struct {
Deep
}
var b bytes.Buffer
@zdunecki
zdunecki / alerts.go
Last active October 4, 2022 23:32
Compile jsx from any language to any view format like hmtl, json
import (
"github.com/livesession/jsxx"
"github.com/livesession/shared/alerts/messages"
)
func main() {
tpl, err := messages.SlackMessage(&messages.SlackMessageData{
event: "NetError",
statusCode: 400,
let timer = null
function unlock(index = 0) {
document.querySelectorAll("form select")[index].removeAttribute("disabled")
document.querySelectorAll("form button")[index].removeAttribute("disabled")
}
function submit(index) {
document.querySelectorAll("form button")[index].click()
}
function helloWorld() {
console.log("Hello World")
}
helloWorld()