Skip to content

Instantly share code, notes, and snippets.

@Cilyan
Cilyan / PKGBUILD
Created February 3, 2013 03:18
Updated PKGBUILD for PNMixer with fix for automake-1.13 (also removed "|| return 1" as they are no longer needed, makepkg handles this alone)
# Maintainer: Nick Lanham <nick@afternight.org>
pkgname=pnmixer-git
pkgver=20130203
pkgrel=1
pkgdesc="PNMixer is a GTK volume mixer applet that runs in the system tray. \
It is lightweight, works with both pulseaudio and alsa, supports mouse wheel \
volume adjustment.
"
arch=('i686' 'x86_64')
license=('GPL')
@Cilyan
Cilyan / PKGBUILD
Created February 3, 2013 17:24
Updated PKGBUILD for pnmixer-git with automake-1.13
# Maintainer: Nick Lanham <nick@afternight.org>
pkgname=pnmixer-git
pkgver=20130203
pkgrel=1
pkgdesc="PNMixer is a GTK volume mixer applet that runs in the system tray. \
It is lightweight, works with both pulseaudio and alsa, supports mouse wheel \
volume adjustment.
"
arch=('i686' 'x86_64')
license=('GPL')
@Cilyan
Cilyan / 0001-Add-support-for-Excito-B3-Bubba.patch
Created July 27, 2013 23:22
Add support for Excito B3 (Bubba) CONFIG_MACH_BUBBA3 added to config plus some extra modules that are suitable for the device (more modem support, better IPv6 and filtering capabilities, more remote control support) The board file has been added in bubba3.patch: Board configuration + special LED support The PKGBUILD was modified to include the p…
From 863ccb3df64f676237c5a6f63da62b1df2c02921 Mon Sep 17 00:00:00 2001
From: Cilyan Olowen <gaknar@gmail.com>
Date: Sun, 28 Jul 2013 01:07:38 +0200
Subject: [PATCH] Add support for Excito B3 (Bubba)
CONFIG_MACH_BUBBA3 added to config plus some extra modules that are suitable for the device (more modem support, better IPv6 and filtering capabilities, more remote control support)
The board file has been added in bubba3.patch: Board configuration + special LED support
The PKGBUILD was modified to include the patch
Signed-off-by: Cilyan Olowen <gaknar@gmail.com>
@Cilyan
Cilyan / fileinsert.py
Created December 20, 2013 11:33
A class to insert content between two tags in a file (draft)
#
# Copyright 2013 Cilyan Olowen <gaknar@gmail.com>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from PyQt4 import QtGui, QtCore
import time
import sys
import random
class WorkerThread(QtCore.QThread):
# Worker Thread
@Cilyan
Cilyan / parsesegment.py
Created February 11, 2014 13:33
Simple lex/parse pattern with one state machine in lexer and another in parser
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
class ParseSegment:
# Dictionary of patterns per state
# Tuples are (token name, pattern, state change command)
_regexes = {
"out": [
@Cilyan
Cilyan / fnv64basedhash.py
Last active May 23, 2022 15:39
Pure Python implementation of FNV64 and a custom hash suitable for urls. The hash prepends a salt in from of the data, then computes the FNV64 hash and encode the data in base64. Remember however that the FNV64 is not a cryptographic hash.
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2014 Cilyan Olowen <gaknar@gmail.com>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
@Cilyan
Cilyan / soundtrack.py
Last active December 19, 2021 11:39
Draws the envelop (waveform) of a track on a Gtk.DrawingArea (vertically), uses PyGI and GStreamer
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Sources:
#
# https://stackoverflow.com/questions/9344888/getting-max-amplitude-for-an-audio-file-per-second
# https://git.gnome.org/browse/pitivi/tree/pitivi/timeline/previewers.py
# http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-base-plugins-audioconvert.html
# http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-good-plugins/html/gst-plugins-good-plugins-level.html
# https://git.gnome.org/browse/pitivi/tree/pitivi/coptimizations/renderer.c
@Cilyan
Cilyan / gtk+-3.10.9-cleanup-def-reference.patch
Created June 22, 2014 16:47
This is a patch against Gtk+-3.10.9 that removes references to the yet obsolete gdk.def and gtk.def files for Win32 build/cross build
--- gdk/Makefile.am 2014-06-22 18:37:26.077172331 +0200
+++ gdk/Makefile.am 2014-06-22 18:38:34.244019623 +0200
@@ -179,8 +179,8 @@
if USE_WIN32
libgdk_3_la_SOURCES += gdkkeynames.c
libgdk_3_la_LIBADD += win32/libgdk-win32.la
-libgdk_3_la_DEPENDENCIES = win32/libgdk-win32.la win32/rc/gdk-win32-res.o gdk.def
-libgdk_3_la_LDFLAGS += -Wl,win32/rc/gdk-win32-res.o -export-symbols $(srcdir)/gdk.def
+libgdk_3_la_DEPENDENCIES = win32/libgdk-win32.la win32/rc/gdk-win32-res.o
+libgdk_3_la_LDFLAGS += -Wl,win32/rc/gdk-win32-res.o