Skip to content

Instantly share code, notes, and snippets.

View jtojnar's full-sized avatar
💤

Jan Tojnar jtojnar

💤
  • ogion.cz
  • Czech Republic
View GitHub Profile
@jtojnar
jtojnar / priklady.md
Last active August 29, 2015 14:13
Příklady
  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
@jtojnar
jtojnar / cp-blue-rect-fix.user.js
Last active December 14, 2016 17:58
Club Penguin blue rectangle fix
// ==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==
menuField :: Context String
menuField = field "menu" $ \_ -> do
path <- toFilePath <$> getUnderlying
let menuPath = takeDirectory path </> "@menu.md"
unsafeCompiler (readFile menuPath) >>= renderPandoc
@jtojnar
jtojnar / status.xml
Created September 29, 2015 20:56
IOF XML ResultStatus
<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>
@jtojnar
jtojnar / mpris-background.py
Last active October 26, 2018 21:38
Set desktop background to DeaDBeeF currently playing album art
#!/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 / flashback-xmonad.nix
Last active July 14, 2019 18:47 — forked from chpatrick/flashback-xmonad.nix
Gnome Flashback with XMonad on NixOS
{
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 / gimp-nix.md
Last active April 18, 2023 04:38
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 NixOS/nixpkgs#67576. I usually update the branch several times a month to point to t

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 / default.nix
Last active May 22, 2021 07:45 — forked from IreneKnapp/default.nix
In-progress attempt to package weechat-matrix-rs for nixpkgs; this is one of several files that would be needed
{ cmake
, fetchFromGitHub
, lib
, libclang
, clang
, openssl
, olm
, glibc
, pkg-config
, rustPlatform
@jtojnar
jtojnar / .php-cs-fixer.dist.php
Last active June 30, 2022 19:58
basic php-cs-fixer config
<?php
$finder = PhpCsFixer\Finder::create()
->exclude('squizlabsD')
->in(__DIR__);
$rules = [
'@PSR2' => true,
// buggy, duplicates existing comment sometimes
'no_break_comment' => false,