Skip to content

Instantly share code, notes, and snippets.

View andrewshadura's full-sized avatar

Andrej Shadura andrewshadura

View GitHub Profile
@andrewshadura
andrewshadura / debbugs.rb
Created March 27, 2012 18:02
Jekyll plugin that allows posting links to Debian BTS.
# A Liquid tag for Jekyll sites that allows posting links to Debian BTS.
# by: Andrew Shadura
#
# Example usage: {% bts 123456 %} //adds a link to a bug #123456
#
# Or, you can just use debian/changelog format, like closes: #123456
# Launchpad bugs are also supported.
require 'cgi'
require './plugins/post_filters'
@andrewshadura
andrewshadura / gtk.css
Created March 28, 2012 11:05
GTK+ 3 done right
.menu {
border-style: solid;
border-width: 1;
}
.menubar .menuitem *:prelight,
.menubar .menuitem:prelight {
background-color: @theme_selected_bg_color;
color: @theme_selected_fg_color;
}
#!/bin/sh
set -e
PREREQ=""
prereqs () {
echo "${PREREQ}"
}
Subject: Detect available Tcl headers automatically.
From: Andrew Shadura <bugzilla@tut.by>
--- a/lib/critcl/critcl.tcl
+++ b/lib/critcl/critcl.tcl
@@ -3647,7 +3647,13 @@
}
proc ::critcl::MinTclVersion {file} {
- return [GetParam $file mintcl 8.4]
@andrewshadura
andrewshadura / fix-narrow.xslt
Created January 22, 2014 11:06
XSLT transformations to fix Slovak addresses
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:exslt="http://exslt.org/common"
xmlns:math="http://exslt.org/math"
xmlns:date="http://exslt.org/dates-and-times"
xmlns:func="http://exslt.org/functions"
xmlns:set="http://exslt.org/sets"
xmlns:str="http://exslt.org/strings"
xmlns:dyn="http://exslt.org/dynamic"
xmlns:saxon="http://icl.com/saxon"
@andrewshadura
andrewshadura / OpenStreetMap_on_Facebook.user.js
Last active August 29, 2015 14:13
OpenStreetMap links on Facebook
// ==UserScript==
// @name OpenStreetMap on Facebook
// @namespace andrew@shadura.me
// @include *://*.facebook.com/*
// @version 1
// @grant none
//
// ==/UserScript==
var f = (function () {
@andrewshadura
andrewshadura / bpi_leds.c
Created February 3, 2015 12:15
Configure BananaPi LEDs
/*
* Configure the blue led on BananaPi
*
* based on Roman Reichel's code, which itself is
*
* based on mii-tool from David A. Hinds <dhinds@pcmcia.sourceforge.org>
*
* http://sourceforge.net/projects/net-tools
*
* which itself is based on mii-diag by Donald Becker <becker@scyld.com>
@andrewshadura
andrewshadura / Makefile
Last active August 29, 2015 14:16 — forked from cjxgm/makefile
.DEFAULT_GOAL := all
.PHONY: ${MAKECMDGOALS}
$(filter-out all,${MAKECMDGOALS}) all: .forward-all
@# no op
.forward-all:
${MAKE} -C build ${MAKECMDGOALS}
${MAKEFILE_LIST}: ;
.SUFFIXES:
#!/usr/bin/env tclsh
namespace eval ::autofile {
}
rename ::proc ::autofile::proc
rename ::open ::autofile::open
set ::autofile::files(::) {}
::autofile::proc proc {name args body} {
From 47946d0a8a68a8e260c9a44e8b2ab448b86f946e Mon Sep 17 00:00:00 2001
From: Andrew Shadura <andrew@shadura.me>
Date: Thu, 27 Aug 2015 18:59:12 +0200
Subject: Add Python3 compatibility
diff --git a/reconfigure/parsers/iniparse/config.py b/reconfigure/parsers/iniparse/config.py
index d007f16..cc37ac4 100644
--- a/reconfigure/parsers/iniparse/config.py
+++ b/reconfigure/parsers/iniparse/config.py
@@ -143,7 +143,7 @@ class BasicConfig(ConfigNamespace):