Skip to content

Instantly share code, notes, and snippets.

View ivan's full-sized avatar
🕸️

Ivan Kozik ivan

🕸️
View GitHub Profile
@ivan
ivan / github-users-starknet-rewards.tsv
Created March 25, 2024 23:02
All GitHub users rewarded STRK in the Starknet airdrop, most-rewarded first
We can't make this file beautiful and searchable because it's too large.
13911.1 swader
13911.1 sorpaas
13911.1 s1na
13911.1 rjl493456442
13911.1 qd-qd
13911.1 protolambda
13911.1 paulrberg
13911.1 noahzinsmeister
13911.1 neurone
13911.1 moodysalem
@ivan
ivan / devtools command.js
Last active March 25, 2024 18:44
Improve column layout in qbittorrent webui
for (const [k, v] of Object.entries(JSON.parse('{"sorted_column_torrentFilesTableDiv":"name","column_uploaded_visible_torrentsTableDiv":"1","column_save_path_visible_torrentsTableDiv":"1","column_last_activity_visible_torrentsTableDiv":"1","column_added_on_width_torrentsTableDiv":"143","column_total_size_width_torrentsTableDiv":"66","column_num_seeds_width_torrentsTableDiv":"54","column_tracker_width_torrentsTableDiv":"228","selected_filter":"all","column_save_path_width_torrentsTableDiv":"590","column_port_width_torrentPeersTableDiv":"57","reverse_sort_torrentFilesTableDiv":"0","column_relevance_width_torrentPeersTableDiv":"73","column_size_width_torrentsTableDiv":"68","reverse_sort_torrentsTableDiv":"1","column_num_leechs_width_torrentsTableDiv":"57","sorted_column_torrentsTableDiv":"upspeed","columns_order_torrentsTableDiv":"priority,state_icon,name,size,total_size,progress,status,num_seeds,num_leechs,dlspeed,upspeed,uploaded,eta,ratio,added_on,last_activity,category,tags,completion_on,tracker,save_path,dl
@ivan
ivan / dig.txt
Created March 15, 2024 16:03
dig -t TXT google.com
# dig -t TXT google.com
; <<>> DiG 9.18.24 <<>> -t TXT google.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13779
;; flags: qr rd ra; QUERY: 1, ANSWER: 11, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 1232
@ivan
ivan / never buy a cheap refrigerator.sh
Last active March 10, 2024 01:27
Fridge software thermostat using Home Assistant + Zooz ZSE44 + Zooz ZEN15 800LR
#!/usr/bin/env zsh
# We use zsh instead of bash so that decimals work in $(( ))
set -eu -o pipefail
ha="http://192.168.10.2:8123"
# Expires 2034
token="..."
@ivan
ivan / config
Last active February 20, 2024 22:19
~/.config/git/config
[url "git@github.com:"]
# GitHub resets slower connections while cloning over HTTPS; only SSH is reliable now.
insteadOf = "https://github.com/"
[core]
# Don't hang forever when we `git fetch` a repo that's been deleted
askPass = /run/current-system/sw/bin/true
pager = less --tabs=4 -RFX
[log]
@ivan
ivan / bard.md
Last active February 4, 2024 10:46
Google Bard before and after the Gemini model

Before (2023-05-12)

how to learn to program faster by being more like an autistic robot

Autistic people often have a natural aptitude for programming, as they tend to be logical, detail-oriented, and have a strong attention to patterns. If you are looking to learn to program faster, you can try to adopt some of the following autistic traits:

  • Focus on the task at hand. Autistic people are often able to focus on a task for long periods of time without getting distracted. This is a valuable skill for programming, as it allows you to work through complex problems without getting sidetracked.
  • Be precise and accurate. Autistic people often have a strong attention to detail. This is important for programming, as even small errors can cause problems.
  • Be persistent. Autistic people are often able to persevere in the face of challenges. This is an important quality for programming, as it can be frustrating at times.
  • Be creative. Autistic people often have a unique way of looking at the w
@ivan
ivan / better-git-branch.sh
Created January 14, 2024 07:37 — forked from schacon/better-git-branch.sh
Better Git Branch output
#!/bin/bash
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
NO_COLOR='\033[0m'
BLUE='\033[0;34m'
YELLOW='\033[0;33m'
NO_COLOR='\033[0m'
@ivan
ivan / nix-serve-ng does not work.txt
Created January 9, 2024 22:54
nix-serve-ng sometimes just crashes with a malloc/free issue
Jan 09 20:58:53 ra systemd[1]: Started nix-serve binary cache server.
Jan 09 22:51:27 ra nix-serve-start[1831]: 10.10.0.1 - - [09/Jan/2024:22:51:27 +0000] "GET /nix-cache-info HTTP/1.1" 200 - "" "curl/8.4.0 Nix/2.18.1"
Jan 09 22:51:27 ra nix-serve-start[1831]: malloc(): unaligned tcache chunk detected
Jan 09 22:51:27 ra nix-serve-start[1831]: free(): unaligned chunk detected in tcache 2
Jan 09 22:51:27 ra systemd[1]: nix-serve.service: Main process exited, code=dumped, status=11/SEGV
Jan 09 22:51:27 ra systemd[1]: nix-serve.service: Failed with result 'core-dump'.
Jan 09 22:51:27 ra systemd[1]: nix-serve.service: Consumed 413ms CPU time, received 8.8K IP traffic, sent 4.6K IP traffic.
Jan 09 22:51:33 ra systemd[1]: nix-serve.service: Scheduled restart job, restart counter is at 1.
Jan 09 22:51:33 ra systemd[1]: Started nix-serve binary cache server.
Jan 09 22:51:34 ra systemd[1]: Stopping nix-serve binary cache server...
@ivan
ivan / unbook-all-inputs.sh
Last active January 9, 2024 08:29
unbook-all-inputs
#!/usr/bin/env zsh
set -eu -o pipefail
# Enable job control for wait-until-jobs-below
set -m
wait-until-jobs-below () {
while test $(jobs | wc -l) -ge "$1"; do
sleep 0.1
@ivan
ivan / 2024_reading.md
Last active April 23, 2024 22:06
2024 reading list