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 / gnome-keyring.patch
Last active August 2, 2024 14:25
Trying to reproduce secret exfiltration with POC in https://gist.github.com/jtojnar/d1c98d5d803cee3998f68e2e1761c8f8
diff --git a/pam/gkr-pam-client.c b/pam/gkr-pam-client.c
index ebb7f798..b575dbbf 100644
--- a/pam/gkr-pam-client.c
+++ b/pam/gkr-pam-client.c
@@ -59,7 +59,7 @@
static int
check_peer_same_uid (struct passwd *pwd,
int sock)
-{
+{syslog (GKR_LOG_INFO, "called %s", __func__);
<!DOCTYPE html>
<html lang="en">
<head>
<title>Multiplier demo</title>
</head>
<body>
<div class="container">
<h1>Contributte Form Multiplier</h1>
{form form}
<div n:multiplier="emails">
@jtojnar
jtojnar / flake.lock
Last active November 28, 2023 11:57
Attempt at packagin kani with fenix https://github.com/model-checking/kani
{
"nodes": {
"fenix": {
"inputs": {
"nixpkgs": [
"nixpkgs"
],
"rust-analyzer-src": "rust-analyzer-src"
},
"locked": {
@jtojnar
jtojnar / tsicsv2gpx.py
Last active July 23, 2023 13:52
Tool for converting CSV files exported from TSI LogView into GPX format.
#!/usr/bin/env python3
"""
This is a tool for converting CSV files exported from TSI LogView into GPX format.
While LogView can export to GPX natively, the produced file has several downsides:
- It uses GPX version 1.1, which cannot be imported to Garmin BaseCamp program.
- It lacks waypoints.
- It lacks some other recorded data like speed or heading.
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE plist
PUBLIC '-//Apple Computer//DTD PLIST 1.0//EN'
'http://www.apple.com/DTDs/PropertyList-1.0.dtd'>
<plist version="1.0">
<dict>
<key>name</key>
<string>SmPL</string>
<key>scopeName</key>
<string>source.smpl</string>
@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,
@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

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 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

@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";