This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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", | |
# ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Minesweeper Clone</title> | |
<style> | |
body { | |
font-family: sans-serif; | |
background: #222; | |
color: #eee; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!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; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
! Add this to your custom filters in uBlock Origin or other blocker extension | |
||media.licdn.com/media/AAYQA*.gif$image | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="hr"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<style> | |
html,body { | |
margin: 0; padding: 0; height: 100%; width: 100%; | |
font-family: sans-serif; background: #fff; | |
display: flex; align-items: center; justify-content: center; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Written by Senko Rasic <senko@senko.net> and released unto Public Domain. | |
# | |
# Save this to ~/.local/bin/clean-transient-folders. Then add it to | |
# your user crontab with a rule like this: | |
# | |
# # Run this every day at 5am | |
# 0 5 * * * /home/<user>/.local/bin/clean-transient-folders | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Cycle through all workspaces and set them to tabbed if "small" and | |
# split horizontally if "big". "Small" is defined as having width less | |
# than 2880, otherwise it's big. | |
# | |
# Looks a bit messy for a split second, but then returns to the current | |
# workspace. | |
workspaces_json="$(swaymsg -t get_workspaces)" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if test -z "$1"; then | |
echo "Usage: $0 <prompt>" | |
exit 1 | |
fi | |
if test -z "$OPENAI_API_KEY"; then | |
echo "OpenAI key is missing - \$OPENAI_API_KEY must be set" | |
exit 1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if test -z "$2"; then | |
echo "Usage: $0 <app_id> <command ...>" | |
exit 1 | |
fi | |
app_id="$1" | |
shift |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Calculate top list of programming languages based on HN stories/comments/points | |
# More info: https://blog.senko.net/relative-popularity-of-programming-languages-on-hacker-news | |
from datetime import datetime, timedelta | |
from json import dump, load | |
from os.path import join, exists | |
from tempfile import gettempdir | |
from typing import Optional |
NewerOlder