Skip to content

Instantly share code, notes, and snippets.

Cilyan Olowen Cilyan

Block or report user

Report or block Cilyan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Cilyan
Cilyan / fnv64basedhash.py
Last active Jul 17, 2019
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.
View fnv64basedhash.py
#!/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
View main.cpp
#include <iostream>
#include "plugins.h"
int main()
{
auto &factory = PluginSystem::PluginFactory::Instance();
auto plugin = factory.GetPlugin("Plugin1");
plugin->DoSomething();
@Cilyan
Cilyan / soundtrack.py
Last active Mar 7, 2017
Draws the envelop (waveform) of a track on a Gtk.DrawingArea (vertically), uses PyGI and GStreamer
View soundtrack.py
#!/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 / PKGBUILD
Created Jan 20, 2016
PKGBUILD for libreoffice-extension-languagetool-nofr, a package that offers the LanguageTool LibO extension without french registered for compatibility with Grammalecte
View PKGBUILD
# Maintainer: 3ED <krzysztof1987 /at/ gmail /dot/ com>
# Contributor: jtts
pkgname=libreoffice-extension-languagetool-nofr
_pkgname=languagetool
pkgver=3.2
pkgrel=1
pkgdesc="An Open Source style and grammar checker. Will not register for french and can this be installed in parallel to Grammalecte"
arch=('any')
url="http://www.languagetool.org/"
@Cilyan
Cilyan / fileinsert.py
Created Dec 20, 2013
A class to insert content between two tags in a file (draft)
View fileinsert.py
#
# 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
@Cilyan
Cilyan / 0001-Add-support-for-Excito-B3-Bubba.patch
Created Jul 27, 2013
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…
View 0001-Add-support-for-Excito-B3-Bubba.patch
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 / PKGBUILD
Created Feb 3, 2013
Updated PKGBUILD for pnmixer-git with automake-1.13
View PKGBUILD
# 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 Feb 3, 2013
Updated PKGBUILD for PNMixer with fix for automake-1.13 (also removed "|| return 1" as they are no longer needed, makepkg handles this alone)
View PKGBUILD
# 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 / depgraph.py
Created Aug 6, 2015
Simple utility to resolve dependencies between arbitrary (but hashable) objects.
View depgraph.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
class DependencyGraph(object):
"""
Handle a dependency graph. Using :py:meth:`insert`, you add objects
to the graph and connect them with their dependencies, and the
:py:meth:`resolve` function will yield them back so that any object
comes after all its dependencies.
"""
@Cilyan
Cilyan / recursivedescent.py
Last active Aug 29, 2015
Example parser using a stateful lexer and a recursive descent parser. Goal is to parse a C file containing structures, unions and variables (no functions) and some doxygen comments, building an AST. (Originally part of a bigger project.)
View recursivedescent.py
# Nodes for the Abstract Syntax Tree
class Node(object):
def __init__(self):
self.children = []
self.parent = None
for attr in self.__attributes__:
setattr(self, attr, None)
def __repr__(self):
main_attr = self.__attributes__[0]
return "<{class_} {attr_name}={attr_value}".format(
You can’t perform that action at this time.