Skip to content

Instantly share code, notes, and snippets.

View jirutka's full-sized avatar
🇺🇦
Слава Україні!

Jakub Jirutka jirutka

🇺🇦
Слава Україні!
View GitHub Profile
@jirutka
jirutka / p2pvc.rb
Created February 21, 2015 12:43
Homebrew formula for p2pvc.
class P2pvc < Formula
homepage "https://github.com/mofarrell/p2pvc"
head "https://github.com/mofarrell/p2pvc.git"
depends_on "pkg-config" => :build
depends_on "homebrew/science/opencv"
depends_on "ncurses"
depends_on "portaudio"
def install
@jirutka
jirutka / curry.py
Last active August 29, 2015 14:15 — forked from JulienPalard/curry.py
#!/usr/bin/env python
def curry(func):
"""
Decorator to curry a function, typical usage:
>>> @curry
... def foo(a, b, c):
... return a + b + c
@jirutka
jirutka / JpaRsqlConverter.java
Last active September 21, 2020 08:28
Very simple, quick & dirty implementation of RSQL to JPA2 converter. See https://github.com/jirutka/rsql-parser.
import cz.jirutka.rsql.parser.ast.*;
import org.springframework.core.convert.ConversionService;
import org.springframework.core.convert.support.DefaultConversionService;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.Path;
import javax.persistence.criteria.Predicate;
import javax.persistence.criteria.Root;
import javax.persistence.metamodel.Attribute;
import java.util.List;
@jirutka
jirutka / README.adoc
Last active August 29, 2015 14:16
Twitter statistics for #InstallFest 2015

Twitter statistics for #InstallFest 2015

  • Number of tweets (excluding RTs): 119

  • Number of tweeting users: 45

TOP tweeting users

Rank

User

Tweets

@jirutka
jirutka / -README.md
Last active January 20, 2024 17:52
Use LDAP to manage system users on Gentoo Linux

Use LDAP to manage system users on Linux

This configuration uses nsswitch and compat mode, which is supposedly obsolete, but much more convenient than alternatives.

Install packages

emerge -va sys-auth/nss_ldap sys-auth/pam_ldap sys-apps/unscd

Note: unscd (Micro Name Service Caching Daemon) is not necessary, but it’s recommended.

@jirutka
jirutka / -README.md
Last active March 15, 2021 04:07
Btrfs in RAID1 as a root filesystem on Gentoo

Btrfs in RAID1 as a root filesystem on Gentoo

Partitioning scheme

Partition Filesystem Size Description
sd*1 ext2 (md/raid1) 256 MiB boot (kernel etc.)
sd*2 sw (md/raid1) 4 GiB swap
sd*3 Btrfs (raid1) * Btrfs
@jirutka
jirutka / travis-trigger-build
Last active March 25, 2018 04:48
This script triggers (re)build of the specified project on Travis CI.
#!/bin/bash
#
# This script triggers (re)build of the specified project on Travis CI.
#
# It expects Travis token to be set in environment variable TRAVIS_TOKEN.
# To get a token, run: travis token.
#
# Usage:
# travis-build-dependent <REPO_SLUG> [<BRANCH>]
#
@jirutka
jirutka / -README.adoc
Last active May 22, 2016 13:12
OpenRC runscript for QEMU/KVM / Moved to https://github.com/jirutka/qemu-openrc
@jirutka
jirutka / README.adoc
Created September 20, 2015 21:38
Twitter statistics for #WebExpo 2015

Twitter statistics for #WebExpo 2015

  • Number of tweets (excluding RTs): 1139

  • Number of favourites: 2804

  • Number of retweets: 1090

  • Number of tweeting users: 341

TOP tweeting users

@jirutka
jirutka / README.adoc
Created October 13, 2015 00:11
Twitter statistics for #LinuxDays 2015

Twitter statistics for #LinuxDays 2015

  • Number of tweets (excluding RTs): 323

  • Number of favourites: 718

  • Number of retweets: 239

  • Number of tweeting users: 134