Skip to content

Instantly share code, notes, and snippets.


Max Horn fingolfin

  • TU Kaiserslautern
  • Germany
View GitHub Profile
View diff-highlight
package DiffHighlight;
use 5.008;
use warnings FATAL => 'all';
use strict;
# Use the correct value for both UNIX and Windows (/dev/null vs nul)
use File::Spec;
fingolfin / bench.g
Created Jul 12, 2019
GAP benchmark function
View bench.g
# Benchmark( func[, optrec] )
# func - a function taking no arguments
# optrec - an optional record with various options
# Measures how long executing the given function "func" takes.
# In order to improve accuracy, it invokes the function repeatedly.
# Before each repetition, the garbage collector is run, and
# (unless turned off by an option) the random number generators
# are reset.
View gist:b641a0b305d1f4e2a6c6
### Keybase proof
I hereby claim:
* I am fingolfin on github.
* I am mhorn ( on keybase.
* I have a public key whose fingerprint is 031E 1B82 9D16 5EB8 DAD1 37F2 2292 55B2 5AE1 7B59
To claim this, I am signing this object:
fingolfin / git-remote-hg
Created Apr 25, 2014
git-remote-hg with various patches added
View git-remote-hg
#!/usr/bin/env python
# Copyright (c) 2012 Felipe Contreras
# Inspired by Rocco Rutte's hg-fast-export
# Just copy to your ~/bin, or anywhere in your $PATH.
# Then you can clone with:
# git clone hg::/path/to/mercurial/repo/
#!/bin/sh -e
# This script generates a .tar.gz, .tar.bz2 and .zip for a GAP package.
# This requires that a tag has been set of the form "v3.1". You then
# may invoke this script like this:
# ./ PKGNAME 3.1
# and the rest happens automatically.
# If a checkout of the website repository is present, this script
# also copies relevant files (PackageInfo.g, documentation) there.
fingolfin / makedoc.g
Created Jan 16, 2013
makedoc.g file for libsing
View makedoc.g
MakeGAPDocDoc( ".", "libsing", [ "../PackageInfo.g" ], "libsing" );;
LoadPackage( "GAPDoc" );
# Determine GAPROOT
if IsRecord(GAPInfo.SystemEnvironment) and
IsBound(GAPInfo.SystemEnvironment.GAPROOT) then
fingolfin /
Created Aug 15, 2012
Small shell script to update GAP repos as well as any package repositories
HG_DIRS=". doc/DevManual"
# Find packages using Mercurial, if any
for pkg in pkg/*/.hg ; do
if [ $pkg = "pkg/*/.hg" ] ; then
fingolfin / gist:3206116
Created Jul 30, 2012
How to rebase TheSin's dpkg pull request
View gist:3206116
# Add alias for TheSin's fink tree, and fetch it
git remote add TheSin
git fetch TheSin
# Setup local branch 'thesin-dpkg' to track TheSin's master branch
git co -b thesin-dpkg TheSin/master
# The first commit that modified @addlist in perlmod/Fink/
# was commit 7b3cc78525. Thus we want to insert a commit *before*
# it that changes @addlist to span multiple lines.
# Therefore, we want to rebase interactively on the *grandparent*.
fingolfin / gist:3098740
Created Jul 12, 2012
Pathological speed in ConjugatorPermGroup, GAP 4.x
View gist:3098740
G:=Group( [
fingolfin /
Created Jun 14, 2012
Fink readline6 package
Info4: <<
Package: readline6%type_pkg[-64bit]
Version: 6.2
Revision: 1
Maintainer: Fink Core Group <>
Type: -64bit (boolean)
Architecture: ( %type_raw[-64bit] = -64bit ) powerpc, ( %type_raw[-64bit] = -64bit ) i386
Depends: %n-shlibs (= %v-%r), ( %type_raw[-64bit] = -64bit ) 64bit-cpu
BuildDepends: <<