Skip to content

Instantly share code, notes, and snippets.

View vancura's full-sized avatar
🫡
Kuju pixle!

Václav Vančura vancura

🫡
Kuju pixle!
View GitHub Profile
@vancura
vancura / kortex-loader.svg
Last active November 10, 2025 16:50
Kortex Loader
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vancura
vancura / danger-buttons.md
Last active October 24, 2025 14:44
Danger Button Candidates Analysis

NOTE: This document is deprecated in favor of podman-desktop/podman-desktop#14590


Danger Button Candidates Analysis

This is the analysis of all potential danger button candidates to determine which buttons should be styled as danger (red) buttons.

Only buttons that immediately perform destructive actions should be danger buttons. Buttons that open confirmation dialogs should remain primary/secondary styled, with the confirmation button in the dialog being danger styled instead.

.js-comment:not(.js-minimize-container):not(.timeline-comment-group) {
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
border: 2px black solid;
}
@media (prefers-color-scheme: dark) {
.js-comment:not(.js-minimize-container):not(.timeline-comment-group) {
border-color: white;
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vancura
vancura / git-diff-summarizer.py
Last active November 19, 2023 11:48
This script summarizes staged Git changes, utilizes GPT-4 to generate a Git commit message, and then copies the results to the clipboard.
import subprocess
import clipboard
from openai import OpenAI
client = OpenAI(api_key = "your-openai-key")
# This command returns the staged changes as a patch
git_diff_command = ['git', 'diff', '--cached']
result = subprocess.run(git_diff_command, text=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.DEVNULL)
<?xml version="1.0"?>
<Patterns xmlns="urn:schemas-jetbrains-com:member-reordering-patterns">
<TypePattern DisplayName="COM interfaces">
<TypePattern.Match>
<And>
<Kind Is="Interface" />
<Or>
<HasAttribute Name="System.Runtime.InteropServices.InterfaceTypeAttribute" />
<HasAttribute Name="System.Runtime.InteropServices.ComImport" />
</Or>

Source Code Typography

Presentation: http://www.slideshare.net/vancura/source-code-typography

Quotes

Dumb quotes (also known as straight quotes) are straight and vertical. Proper typography never uses straight quotes. They are left over from the age of typewriters, and their only modern use is for coding.

@vancura
vancura / dribbble-2x-replacer.js
Created August 14, 2015 14:37
Dribbble @2x replacer: change @1x to @2x.
// ==UserScript==
// @name Dribbble 2x
// @namespace http://vancura.org
// @description Use 2x images
// @homepage http://vancura.org
// @version 0.0.1
// @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js
// @include *://dribbble.com/*
// ==/UserScript==
@vancura
vancura / server.sh
Created May 3, 2015 02:59
Start an HTTP server from a directory, optionally specifying the port
# =========================================================================
# = Start an HTTP server from a directory, optionally specifying the port =
# =========================================================================
function server() {
local port="${1:-8000}"
open "http://localhost:${port}/"
# Set the default Content-Type to `text/plain` instead of `application/octet-stream`
# And serve everything as UTF-8 (although not technically correct, this doesn’t break anything for binary files)
python -c $'import SimpleHTTPServer;\nmap = SimpleHTTPServer.SimpleHTTPRequestHandler.extensions_map;\nmap[""] = "text/plain";\nfor key, value in map.items():\n\tmap[key] = value + ";charset=UTF-8";\nSimpleHTTPServer.test();' "$port"

Keybase proof

I hereby claim:

  • I am vancura on github.
  • I am vancura (https://keybase.io/vancura) on keybase.
  • I have a public key whose fingerprint is 9EFF C6EE 57AB 1625 AAA5 2145 BC60 963F E661 20D0

To claim this, I am signing this object: