Skip to content

Instantly share code, notes, and snippets.

@Rahix
Rahix / PKGBUILD
Last active Sep 8, 2021
gimp-plugin-vtf PKGBUILD
View PKGBUILD
pkgname=gimp-plugin-vtf
pkgver=1.0+1+g76c40be
pkgrel=1
pkgdesc="VTF GIMP plugin"
url="https://github.com/linux-source-tools/gimp-plugin-vtf"
arch=(x86_64)
license=(unknown)
depends=(gimp)
makedepends=(cmake)
_commit=e351d8eafb7e7af3193d750ef61783e02ad61a8b
@Rahix
Rahix / 01-rust-thread-affinity.md
Last active Aug 25, 2021
Rust demonstration of setting thread affinity with pthread_setaffinity_np
View 01-rust-thread-affinity.md

Call this program with -s N to set a specific CPU. Without -s, the thread will have the default affinity.

This program will print out the main threads CPU, the child threads CPU and the child threads affinity after optionally setting it.

@Rahix
Rahix / node_editor.qml
Created Mar 9, 2016
QML Node editor proof of concept. Works with my gtk themes, but may not work with others (non-dynamic spacing)
View node_editor.qml
import QtQuick 2.3
import QtQuick.Controls 1.2
import QtQuick.Extras 1.4
import QtQuick.Window 2.2
import QtPositioning 5.5
ApplicationWindow {
id: window
visible: true
width: 640
@Rahix
Rahix / echoed.c
Last active Dec 16, 2019
echoed - A very questionable daemon for converting upper-case and lower-case
View echoed.c
/*
* echoed - Pipedeamon which changes to lowercase and uppercase
* Copyright (C) 2019 Harald Seiler
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
@Rahix
Rahix / A_parts.rs
Last active Jan 19, 2019
Proof of concept for moveable parts
View A_parts.rs
https://start.duckduckgo.com/// These are our "fake" pins
#[derive(Debug)]
pub struct PA;
#[derive(Debug)]
pub struct PB;
#[derive(Debug)]
pub struct PC;
#[derive(Debug)]
pub struct PD;
@Rahix
Rahix / main.rs
Last active Dec 29, 2018
Static and Dynamic Dispatch at the same time
View main.rs
trait Foo {
fn bar(&self);
}
impl Foo for &dyn Foo {
fn bar(&self) {
(*self).bar();
}
}
@Rahix
Rahix / PKGBUILD-file-roller-vpk
Last active Jun 5, 2018
file-roller-vpk archlinux PKGBUILD
View PKGBUILD-file-roller-vpk
pkgname=file-roller-vpk
pkgver=3.28.0+33+g88d3ac6a
pkgrel=1
pkgdesc="File Roller with Valve Pak (VPK) support"
url="https://https://github.com/linux-source-tools/file-roller-vpk"
arch=(x86_64)
license=(GPL)
depends=(gtk3 libarchive file libnotify zip unzip)
makedepends=(intltool itstool docbook-xsl gnome-common git libnautilus-extension)
optdepends=("p7zip: 7z, arj, exe and encrypted zip files support"
@Rahix
Rahix / PKGBUILD
Created Jun 4, 2018
PKGBUILD for lollypop-transparent
View PKGBUILD
# Maintainer: Dan Beste <dan.ray.beste@gmail.com>
# Contributor: Frederic Bezies < fredbezies at gmail dot com>
# Contributor: Ian Brunelli (brunelli) <ian@brunelli.me>
pkgname="lollypop-transparent"
_gitname="lollypop-transparent"
_gitname_orig="lollypop"
pkgdesc='Lollypop with a transparent background'
pkgver=0.9.304.r573.g20395d12
pkgrel=1
@Rahix
Rahix / PKGBUILD
Last active Jan 10, 2018
gdk-pixbuf-vtf PKGBUILD
View PKGBUILD
pkgname=gdk-pixbuf-vtf
pkgver=2.1
pkgrel=1
pkgdesc="VTF GDK Pixbuf Loader library"
url="https://github.com/linux-source-tools/gdk-pixbuf-vtf"
arch=(x86_64)
license=(unknown)
depends=(gdk-pixbuf2)
makedepends=(cmake)
_commit=7fb2f837bd54af9296f43573877895d7e90b95fe
@Rahix
Rahix / addon.py
Last active Sep 12, 2016
Blender Plugin for my Spacestation Generator
View addon.py
import random
# This seems to be a well working system for loading the
# generator script, however I don't know
# wether it is required to look like this
if "bpy" in locals():
import importlib
importlib.reload(spacestation)
else:
from . import spacestation