Skip to content

Instantly share code, notes, and snippets.

View mireq's full-sized avatar
😼

Miroslav Bendík mireq

😼
View GitHub Profile
@mireq
mireq / CLAUDE.md
Created November 19, 2026 17:09
CLAUDE.md

Communication

Respond terse like smart caveman. All technical substance stay. Only fluff die. Caveman is a voice, not broken grammar. Every word earns its place. Every fact survives. Active every response, whole session, until I say "stop caveman" or "normal mode". Unsure if still on? It is. Confirm switch-off in one line.

Rules:

  1. Answer first: answer, then reason, then next step. Pattern: [thing] [action] [reason]. [next step].
  2. Kill ceremony: no greeting, hedging, pleasantries, recap, or closer. No "Sure!", "Let me", "I'll now", "Hope this helps". No just/really/basically/actually/simply.
  3. Short word: "fix" not "implement a solution for". Standard acronyms fine (DB, API, HTTP). No invented abbreviations (cfg, impl, fn). No arrows.
\set QUIET ON
\timing on
\encoding unicode
\x auto
\pset null ∅
\pset linestyle unicode
\pset border 2
--\pset pager always
@mireq
mireq / userChrome.css
Last active June 25, 2026 03:56
Compact responsive oneliner for Firefox
*|*:root:not([customizing]) {
--new-tab-height: 29px;
}
:root {
--urlbar-height: 29px; /* Set the desired height here */
}
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
@mireq
mireq / install_bip_skin.sh
Last active March 24, 2019 15:01
Script to install amazfit bip watch face from amazfitwatchfaces.com
#!/bin/bash
# USAGE: bash install_bip_skin.sh https://amazfitwatchfaces.com/bip/view/id [version]
# bash install_bip_skin.sh https://amazfitwatchfaces.com/bip/view/8992 5b32bd
watchface_dir=/sdcard/Android/data/com.xiaomi.hm.health/files/watch_skin_local
mkdir -p tmp
curl $1 > tmp/amazfit.html 2> /dev/null
preview=`cat tmp/amazfit.html|grep '<meta property="og:image"'|head -n 1|tr -d '\r'|sed -e 's/.*content="\([^"]*\)".*/\1/g'`
@mireq
mireq / django_add_common_files.sh
Last active September 17, 2020 06:17
Utility for creating new django project
#!/bin/bash
if [ -e manage.py ]
then
echo "Installing"
else
echo "Not django directory"
exit
fi
@mireq
mireq / material_preview.py
Created October 22, 2016 11:52
Blender material preview in node editor
import bpy
class PreviewPanel(bpy.types.Panel):
bl_label = "Material preview"
bl_space_type = "NODE_EDITOR"
bl_region_type = "UI"
@classmethod
def poll(cls, context):
@mireq
mireq / run-django.py
Last active September 29, 2022 04:27
Django uwsgi runner with reloader
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import argparse
import atexit
import collections
import itertools
import os
import signal
bgcolor=0
silentpic=images/background-1280x800.jpg
tx=0
ty=100
tw=1280
th=700
text_x=800
text_y=450
@mireq
mireq / time_series.py
Last active August 11, 2020 15:33
Django ORM time series
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from collections import namedtuple
from datetime import datetime, date, time, timedelta
from functools import partial
from django.db import models
from django.db.models.expressions import DateTime, Date
from django.utils import timezone
@mireq
mireq / reactor.js
Created September 26, 2015 11:00
Reactor.js
;(function (){
"use strict";
var el = document.createElement('DIV');
if (Array.prototype.forEach) {
var coreForEach = Array.prototype.forEach;
var forEach = function(collection, fn) {
coreForEach.call(collection, fn);