Skip to content

Instantly share code, notes, and snippets.

View senko's full-sized avatar

Senko Rašić senko

View GitHub Profile
@senko
senko / singleton.py
Created February 25, 2013 08:01
Singleton Django Model
# Written by Senko Rasic <senko.rasic@goodcode.io>
# Released into Public Domain. Use it as you like.
from django.db import models
class SingletonModel(models.Model):
"""Singleton Django Model
Ensures there's always only one entry in the database, and can fix the
@senko
senko / dictat.py
Created November 6, 2025 08:20
Dictat - simple dictation+transcription app for GNOME in Python, using PipeWire and Whisper
#!/usr/bin/env -S uv run -s
"""
Dictat - A simple dictation and transcription app for GNOME
Records audio using PipeWire (pw-record) and transcribes using local Whisper.
"""
# /// script
# requires-python = ">=3.13"
# dependencies = [
@senko
senko / minesweeper-gpt5-nano.html
Created August 8, 2025 07:39
GPT-5 nano zero-shotting Minesweeper
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<title>Minesweeper Mini</title>
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
:root{
--bg: #0f1220;
--panel: #181a2a;
@senko
senko / minesweeper-gpt5-full.html
Created August 8, 2025 07:34
GPT-5 (full) zero-shotting Minesweeper
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Minesweeper — Pure HTML/CSS/JS</title>
<style>
:root{
--bg: #0f1226;
--surface: #171a37;
@senko
senko / minesweeper-qwen3-coder.html
Created July 23, 2025 11:17
Qwen3-coder single-shotting Minesweeper
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Minesweeper</title>
<style>
* {
box-sizing: border-box;
margin: 0;
@senko
senko / minesweeper-kimi-k2.html
Created July 18, 2025 08:20
Kimi K2 single-shotting minesweeper on Groq
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Minesweeper Clone</title>
<style>
body {
font-family: Arial, sans-serif;
display: flex;
@senko
senko / qrgen.py
Created May 23, 2025 14:42
QR Code generator app for GTK/GNOME
#!/usr/bin/env -S uv run -s
# This script generates a QR code from a string input and displays it in a GTK window.
# /// script
# requires-python = ">=3.13"
# dependencies = [
# "pillow>=11.2.1",
# "pygobject==3.50.0",
# "qrcode>=8.2",
# ]
@senko
senko / minesweeper-gpt41.html
Created April 15, 2025 10:46
Minesweeper - single shot implementation by GPT 4.1
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Minesweeper Clone</title>
<style>
body {
font-family: sans-serif;
background: #222;
color: #eee;
@senko
senko / onchange.sh
Last active April 1, 2025 17:30
OnChange - Watch current directory and execute a command if anything in it changes
#!/bin/bash
#
# Watch current directory (recursively) for file changes, and execute
# a command when a file or directory is created, modified or deleted.
#
# Written by: Senko Rasic <senko.rasic@dobarkod.hr>
#
# Requires Linux, bash and inotifywait (from inotify-tools package).
#
# To avoid executing the command multiple times when a sequence of
@senko
senko / minesweeper.html
Created March 26, 2025 16:47
Minesweeper - single shot, Google Gemini 2.5 Pro
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Simple Minesweeper</title>
<style>
body {
font-family: sans-serif;
display: flex;