Skip to content

Instantly share code, notes, and snippets.

View andrewshadura's full-sized avatar

Andrej Shadura andrewshadura

View GitHub Profile
@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 / 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 / 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"
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]
#!/bin/sh
set -e
PREREQ=""
prereqs () {
echo "${PREREQ}"
}
@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;
}
@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'