Skip to content

Instantly share code, notes, and snippets.

Avatar
💤

Jan Tojnar jtojnar

💤
View GitHub Profile
View stop-+1-comments.md

Hi,

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.

Cheers.

Jan

@jtojnar
jtojnar / gimp-nix.md
Last active Mar 16, 2021
How to use Nix to build fresh GIMP
View gimp-nix.md

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 https://github.com/NixOS/nixpkgs/pull/67576. I usually update the branch several times a month to point to t

@jtojnar
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
jtojnar / mpris-background.py
Last active Oct 26, 2018
Set desktop background to DeaDBeeF currently playing album art
View mpris-background.py
#!/usr/bin/python3
'''
This script connects to DeaDBeeF MPRIS API
(provided by https://github.com/Serranya/deadbeef-mpris2-plugin)
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
jtojnar / status.xml
Created Sep 29, 2015
IOF XML ResultStatus
View status.xml
<xsd:simpleType name="ResultStatus">
<xsd:annotation>
<xsd:documentation>
The result status of the person or team at the time of the result generation.
</xsd:documentation>
</xsd:annotation>
<xsd:restriction base="xsd:NMTOKEN">
<xsd:enumeration value="OK">
<xsd:annotation>
<xsd:documentation>
View a.hs
menuField :: Context String
menuField = field "menu" $ \_ -> do
path <- toFilePath <$> getUnderlying
let menuPath = takeDirectory path </> "@menu.md"
unsafeCompiler (readFile menuPath) >>= renderPandoc
@jtojnar
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 http://fan-club-penguin.cz/
// @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 http://play.clubpenguin.com/*
// @grant none
// ==/UserScript==
View priklady.md
  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
<?php
class ParsedownDetails extends ParsedownExtra {
function __construct() {
$this->BlockTypes['¡'][] = 'Details';
parent::__construct();
}
// Details
protected function blockDetails($Line) {
View wikipedia-subheading-links.user.js