Skip to content

Instantly share code, notes, and snippets.

View sputnikus's full-sized avatar

Martin Putniorz sputnikus

  • Freelance
  • Brno, Czech Republic
View GitHub Profile
@sputnikus
sputnikus / command.fish
Created July 3, 2025 07:51
Nix install on Artix + OpenRC + Fish
curl --proto '=https' --tlsv1.2 -L https://nixos.org/nix/install | sh -s -- --daemon
sudo chmod a+x /etc/init.d/nix-daemon
fisher install kidonng/nix-completions.fish
@sputnikus
sputnikus / rose-pine-theme.json
Created June 24, 2025 11:38
Rose Pine theme for opencode. Using base Rose Pine for dark colors and Rose Pine Dawn for lights. Generated by Claude Sonnet 4.
{
"$schema": "https://opencode.ai/theme.json",
"defs": {
"rosePineBase": "#191724",
"rosePineSurface": "#1f1d2e",
"rosePineOverlay": "#26233a",
"rosePineMuted": "#6e6a86",
"rosePineSubtle": "#908caa",
"rosePineText": "#e0def4",
"rosePineLove": "#eb6f92",
@sputnikus
sputnikus / llm_conventional_desc.fish
Last active July 11, 2025 14:15
Generate Jujutsu change description using llm tool in Conventional Commit format
#!/usr/bin/env fish
# Shebang for testing, Jujutsu config at the end of this file
# LLMs are useful for generating the first line of the CC (the What), but you
# should always review generated description to include the Why and the How.
set -l DIFF $(jj diff --git -r @)
if [ -z "$DIFF" ]
echo "No changes found."
return 1
end
@sputnikus
sputnikus / to_be_a_beast.py
Created October 14, 2018 09:54
Macro calculation based on the To Be a Beast article https://www.barbellmedicine.com/584-2/ by Jordan Feigenbaum
#!/usr/bin/env python
import enum
from math import ceil
import click
MALE = "male"
FEMALE = "female"
CUT = "cut"
gw0 [receiver-thread] RECEIVERTHREAD: starting to run
gw0 sent <Message CHANNEL_EXEC channel=1 lendata=7086>
gw0 sent <Message CHANNEL_DATA channel=1 lendata=1935>
gw1 [receiver-thread] RECEIVERTHREAD: starting to run
gw1 sent <Message CHANNEL_EXEC channel=1 lendata=7086>
gw1 sent <Message CHANNEL_DATA channel=1 lendata=1935>
gw0 [receiver-thread] received <Message CHANNEL_DATA channel=1 lendata=390>
gw0 [receiver-thread] received <Message CHANNEL_DATA channel=1 lendata=27>
gw0 [receiver-thread] received <Message CHANNEL_DATA channel=1 lendata=124>
gw0 [receiver-thread] received <Message CHANNEL_DATA channel=1 lendata=135>
@sputnikus
sputnikus / build.sh
Created June 4, 2014 05:43
End-To-End extension build script fo Arch Linux
#!/usr/bin/env bash
jscompile_e2e="python2 closure-library/closure/bin/build/closurebuilder.py --root end-to-end --root closure-library --root closure-templates/javascript --root zlib.js/src --root typedarray -o compiled -c compiler.jar"
csscompile_e2e="java -jar closure-stylesheets-20111230.jar end-to-end/javascript/crypto/e2e/extension/ui/styles/base.css"
# compile javascript files
$jscompile_e2e -i end-to-end/javascript/crypto/e2e/extension/bootstrap.js > end-to-end/javascript/crypto/e2e/extension/launcher_binary.js
$jscompile_e2e -i end-to-end/javascript/crypto/e2e/extension/helper/helper.js > end-to-end/javascript/crypto/e2e/extension/helper_binary.js
$jscompile_e2e -i end-to-end/javascript/crypto/e2e/extension/ui/glass/bootstrap.js > end-to-end/javascript/crypto/e2e/extension/glass_binary.js
$jscompile_e2e -i end-to-end/javascript/crypto/e2e/extension/ui/prompt/prompt.js > end-to-end/javascript/crypto/e2e/extension/prompt_binary.js
@sputnikus
sputnikus / gist:4881ddd57e99d3bd4d22
Created June 3, 2014 14:17
64-bit Linux build of Light Table 0.6.6
$ ldd /opt/LightTable/ltbin
linux-gate.so.1 (0xf77d2000)
libX11.so.6 => /usr/lib32/libX11.so.6 (0xf7645000)
libXrender.so.1 => /usr/lib32/libXrender.so.1 (0xf763a000)
librt.so.1 => /usr/lib32/librt.so.1 (0xf7631000)
libdl.so.2 => /usr/lib32/libdl.so.2 (0xf762c000)
libgobject-2.0.so.0 => /usr/lib32/libgobject-2.0.so.0 (0xf75da000)
libglib-2.0.so.0 => /usr/lib32/libglib-2.0.so.0 (0xf74cf000)
libgtk-x11-2.0.so.0 => /usr/lib32/libgtk-x11-2.0.so.0 (0xf706c000)
libgdk-x11-2.0.so.0 => /usr/lib32/libgdk-x11-2.0.so.0 (0xf6fbd000)
@sputnikus
sputnikus / PKGBUILD
Last active August 29, 2015 13:59
Popcorn Time 0.2.9 PKGBUILD
# Maintainer: Attila Bukor <r1pp3rj4ck [at] w4it [dot] eu>
# Contributor: Eric Engestrom <aur [at] engestrom [dot] ch>
# Contributor: Iwan Timmer <[email protected]>
# Contributor: Ricardo Band <me [at] xengi [dot] de>
# Contributor: Martin Putniorz <mputniorz [at] gmail [dot] com>
pkgname=popcorntime
pkgver=0.2.9
pkgrel=1
pkgdesc="Stream movies from torrents. Skip the downloads. Launch, click, watch."

Keybase proof

I hereby claim:

  • I am sputnikus on github.
  • I am sputnikus (https://keybase.io/sputnikus) on keybase.
  • I have a public key whose fingerprint is FF9A 3F36 90C9 C8D6 D52F 1D2D 25CA 9B71 1609 D2CB

To claim this, I am signing this object:

import xchat, re, requests
from requests.auth import HTTPBasicAuth
__module_name__ = "vlcnowplaying"
__module_version__ = "1.1"
__module_description__ = "sputnikus' Now playing script for vlc"
metare = re.compile("""<meta\-information\>
\<title\>\<\!\[CDATA\[(.*)\]\]\>\<\/title\>
\<artist\>\<\!\[CDATA\[(.*)\]\]\>\<\/artist\>
\<genre\>\<\!\[CDATA\[(.*)\]\]\>\<\/genre\>