Skip to content

Instantly share code, notes, and snippets.

View fingolfin's full-sized avatar

Max Horn fingolfin

  • University of Kaiserslautern-Landau
  • Kaiserslautern, Germany
  • 23:53 (UTC +02:00)
View GitHub Profile
#!/usr/bin/perl
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
fingolfin / bench.g
Created July 12, 2019 09:26
GAP benchmark function
# 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.
@fingolfin
fingolfin / makedoc.g
Created January 16, 2013 12:58
makedoc.g file for libsing
LoadPackage("gapdoc");;
MakeGAPDocDoc( ".", "libsing", [ "../PackageInfo.g" ], "libsing" );;
LoadPackage( "GAPDoc" );
# Determine GAPROOT
if IsRecord(GAPInfo.SystemEnvironment) and
IsBound(GAPInfo.SystemEnvironment.GAPROOT) then
@fingolfin
fingolfin / update-all.sh
Created August 15, 2012 15:33
Small shell script to update GAP repos as well as any package repositories
#!/bin/sh
HG_DIRS=". doc/DevManual"
GIT_DIRS=
# Find packages using Mercurial, if any
for pkg in pkg/*/.hg ; do
if [ $pkg = "pkg/*/.hg" ] ; then
break
fi
@fingolfin
fingolfin / gist:3206116
Created July 30, 2012 10:38
How to rebase TheSin's dpkg pull request
# Add alias for TheSin's fink tree, and fetch it
git remote add TheSin https://github.com/TheSin-/fink
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/Bootstrap.pm
# 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
fingolfin / gist:3098740
Created July 12, 2012 15:11
Pathological speed in ConjugatorPermGroup, GAP 4.x
G:=Group( [
(26,51,76,101)(27,52,77,102)(28,53,78,103)(29,54,79,104)(30,55,80,105)
(31,56,81,106)(32,57,82,107)(33,58,83,108)(34,59,84,109)(35,60,85,110)
(36,61,86,111)(37,62,87,112)(38,63,88,113)(39,64,89,114)(40,65,90,115)
(41,66,91,116)(42,67,92,117)(43,68,93,118)(44,69,94,119)(45,70,95,120)
(46,71,96,121)(47,72,97,122)(48,73,98,123)(49,74,99,124)(50,75,100,125),
(2,16,26,77,44,7,91,54,108,50,37,67,93,74,8,96,104,60,63,48,47,42,17,41)
(3,21,51,103,75,13,121,80,39,57,68,98,124,85,14,106,30,87,94,59,58,73,23,71)
(4,6,76,29,82,19,31,102,70,88,99,109,35,112,20,36,52,118,125,90,89,84,9,81)
(5,11,101,55,113,25,61,28,97,119,110,40,62,43,22,66,78,49,32,117,120,115,15,111)
@fingolfin
fingolfin / readline6.info
Created June 14, 2012 21:05
Fink readline6 package
Info4: <<
Package: readline6%type_pkg[-64bit]
Version: 6.2
Revision: 1
Maintainer: Fink Core Group <fink-core@lists.sourceforge.net>
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: <<
@fingolfin
fingolfin / gitconfig
Created October 22, 2011 19:14
my gitconfig
[user]
name = Max Horn
email = max@quendi.de
signingkey = REDACTEDHASH
[alias]
st = status
ci = commit
br = branch
co = checkout
df = diff
@fingolfin
fingolfin / hom-examples.gap
Created July 5, 2011 12:06
GAP fun with group homomorphisms
First three examples that create groups G, K and a homomorphism hom
between them.
In the fourth section there is some generic test code...
Example abelian direct product:
-------------------------------
# G = any abelian group; for this one with a "complicated"
# representation.
@fingolfin
fingolfin / scummvm-configure-remarks.md
Created May 4, 2011 11:55
Comments on the ScummVM configure

In the following, I go through the ScummVM configure script sequentially, and roughly describe what each part does. Three of these sections are highlighted (dubbed sections A, B and C). These three do somewhat similar things, namely set settings based on _host_os, _host resp. _backends. They are the primary reason for this analysis: Right now, they are used in a very inconsistent fashion, people currently mostly guess when they decide which of the three sections to use. I would like to analyze what each is really good for. Also, possibly move section C further up (right after section B if possible), so that its settings also can affect detection of libraries.

The line numbers refer to this revision.

Anyway, here we go:

line 1

general setup, default settings, functions, etc.