Skip to content

Instantly share code, notes, and snippets.


Jan Tojnar jtojnar

View GitHub Profile


the reason I am downvoting the +1 comments is because they do not add anything to the discussion and only cause everyone subscribed to be spammed. Maintainers will work on issues when they have time, one extra comment will rarely change their priorities.

Please use the 👍️ button in the future to let people know you care about the issue. It does not spam people and it is also easier to tally.



jtojnar /
Last active Mar 16, 2021
How to use Nix to build fresh GIMP

Nix is a package manager that you can install in parallel with your system package manager on Linux or MacOS. It allows you to effortlesly build any of the thousands of packages defined in the nixpkgs repository or write your own package expressions. Packages in the nixpkgs repository get periodically built by our CI server so the GIMP dependencies will be obtained from binary cache saving you time.

To obtain Nix, you can simply run an installation script, or use your package manager if it is packaged in your distro repositories. Notably, there is a package in Arch’s AUR and Debian Unstable.

The pull request containing changes for the latest changes for GIMP master is I usually update the branch several times a month to point to t

jtojnar / flashback-xmonad.nix
Last active Jul 14, 2019 — forked from chpatrick/flashback-xmonad.nix
Gnome Flashback with XMonad on NixOS
View flashback-xmonad.nix
services.displayManager.extraSessionFilePackages =
let gnome-flashback-xmonad = {wmName, wmLabel, wmCommand}: pkgs.callPackage ({ stdenv, gnome3, bash, haskellPackages, glib, wrapGAppsHook }: stdenv.mkDerivation {
name = "gnome-flashback-${wmName}";
buildInputs = [ gnome3.gnome-flashback gnome3.gnome-panel bash haskellPackages.xmonad glib ];
nativeBuildInputs = [ wrapGAppsHook ];
unpackPhase = "true";
jtojnar /
Last active Oct 26, 2018
Set desktop background to DeaDBeeF currently playing album art
This script connects to DeaDBeeF MPRIS API
(provided by
and sets GNOME desktop background to the album art when available.
Copyright © 2018 Jan Tojnar
Permission is hereby granted, free of charge, to any person obtaining a copy
jtojnar / status.xml
Created Sep 29, 2015
IOF XML ResultStatus
View status.xml
<xsd:simpleType name="ResultStatus">
The result status of the person or team at the time of the result generation.
<xsd:restriction base="xsd:NMTOKEN">
<xsd:enumeration value="OK">
View a.hs
menuField :: Context String
menuField = field "menu" $ \_ -> do
path <- toFilePath <$> getUnderlying
let menuPath = takeDirectory path </> ""
unsafeCompiler (readFile menuPath) >>= renderPandoc
jtojnar / cp-blue-rect-fix.user.js
Last active Dec 14, 2016
Club Penguin blue rectangle fix
View cp-blue-rect-fix.user.js
// ==UserScript==
// @name Club Penguin blue rectangle fix
// @namespace
// @version 0.3
// @description Fixes blue rectangles on Club Penguin and also makes it a little faster on some computers
// @author Lisured
// @run-at document-start
// @match*
// @grant none
// ==/UserScript==
  1. ze vzorce S = 1/2 av_a pro obsah trojúhelníku vyjádříme výšku v_a na stranu a. (neznámá je v_a)
S = 1/2 * a * »v«

S = 1/2 * a * v | *2 (stejné jako kdybychom dělili 1/2)
2 * S = 2 * 1/2 * a * v
2 * S = a * v | /a → podmínka a ≠ 0
2 * S / a = a / a * v
2 * S / a = v
View ParsedownDetails.php
class ParsedownDetails extends ParsedownExtra {
function __construct() {
$this->BlockTypes['¡'][] = 'Details';
// Details
protected function blockDetails($Line) {
View wikipedia-subheading-links.user.js