Skip to content

Instantly share code, notes, and snippets.

@b4n
b4n / Makefile.am
Last active August 29, 2015 13:57
No-libtool Autotools shared libraries: Welcome to Portability Hell
# alias libdir to prevent Automake from whining trying to be too smart
sodir = $(libdir)
so_PROGRAMS = libtt.so
bin_PROGRAMS = ttp
libtt_so_SOURCES = tt.c
libtt_so_CFLAGS = -fPIC
libtt_so_LDFLAGS = -shared
@b4n
b4n / Makefile
Created April 12, 2014 01:21
Internal Mnemonics Checker -- Checks Geany's internal mnemonics for conflicts
PLUGIN := internal-mnemonics-check
VPATH ?= .
# requires https://github.com/b4n/geany-plugin.mk
include $(VPATH)/geany-plugin.mk
@b4n
b4n / Makefile
Last active August 29, 2015 13:59
PLUGIN := cc-plugin
PLUGIN_SOURCES := plugin.cc plugin.c
plugindir = $(HOME)/.config/geany/plugins
VPATH ?= .
# requires https://github.com/b4n/geany-plugin.mk
include $(VPATH)/geany-plugin.mk
@b4n
b4n / pm-dialog-mockup.glade
Created April 30, 2014 13:55
Geany PM dialog mockup (not like it's gonna happen like that, but we can have fun and maybe end up with something)
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="2.24"/>
<!-- interface-naming-policy project-wide -->
<object class="GtkDialog" id="dialog1">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes">Plugin Manager</property>
<property name="icon_name">geany</property>
<property name="type_hint">dialog</property>
@b4n
b4n / file.c
Created October 22, 2014 00:16
MIO file vs. mmap()ed file
#include <stdio.h>
#include "mio/mio.h"
int
main (int argc,
char **argv)
{
int ret = 0;
int i;
@b4n
b4n / tm_ws_thread.c
Last active August 29, 2015 14:08
A shot at the feasibility and implementation complexity of a thread-based asynchornous TM source file updating
/*
* Threaded TM updates.
*
* One worker thread processes parsing jobs.
*
* A job represents the update of one single source file.
* A group represents the user's update request, that can consist of several update jobs.
*
* The job<->group relation is many-to-many: A group can consist of multiple jobs, and a job can be
* shared by several groups. This allows to perform bulk updates as a single job, while allowing
@b4n
b4n / shadows.py
Created March 4, 2015 19:30
GTK shadow test
#!/usr/bin/env python
# chose either GTK 2 or 3
GTK=2
if GTK == 3:
from gi.repository import Gtk, GLib
else:
import gtk as Gtk
import glib as GLib
@b4n
b4n / Makefile
Last active August 29, 2015 14:20
Test Scintilla indicators in Geany
#!/usr/bin/make -f
PLUGIN = indictest
VPATH ?= .
# fetch from https://github.com/b4n/geany-plugin.mk
include $(VPATH)/geany-plugin.mk
@b4n
b4n / Makefile
Last active August 29, 2015 14:21
Geany disabled C preprocessor highlighter
#!/usr/bin/make -f
PLUGIN = c-preproc-hl
VPATH ?= .
# fetch from https://github.com/b4n/geany-plugin.mk
include $(VPATH)/geany-plugin.mk
@b4n
b4n / mergetags
Last active August 29, 2015 14:24
mergetags -- A tool to update entries for a single file in a CTags tag file
#!/bin/sh
#
# FIXME: better error checking. As many commands are piped, their return code
# is not properly checked.
export LANG=C
set -e
### argument parsing