Skip to content

Instantly share code, notes, and snippets.

View benruijl's full-sized avatar

Ben Ruijl benruijl

View GitHub Profile
@benruijl
benruijl / unused.sh
Created January 24, 2012 15:46
unused: finds unused package on your Arch Linux box
shopt -s extglob
declare -A access
access=();
cutoff=$(date +%s -d "1 week ago");
packages=$(pacman -Ql | tail -n 5000);
IFS=$'\n'
for package in $packages; do
pname=$(echo $package | cut -f1 -d' ');
@benruijl
benruijl / Example.java
Created August 18, 2012 09:28
Java pathfinding utility class
package pathfinding;
import pathfinding.Grid2d;
public class Example {
public Example() {
double[][] map = { { 0, 1, 2 }, { 3, 3, 2 }, { 0, -1, 0 } };
Grid2d map2d = new Grid2d(map, false);
System.out.println(map2d.findPath(0, 0, 2, 2));
}
@benruijl
benruijl / keybase.md
Created July 29, 2016 10:58
keybase.md

Please publicly post the following Gist, and name it keybase.md

Keybase proof

I hereby claim:

  • I am benruijl on github.
  • I am benruijl (https://keybase.io/benruijl) on keybase.
  • I have a public key ASD-AVhC9lA8iAbcSDA14mUmXd_e6oZwmKgdi5a3esxplAo
@benruijl
benruijl / test.c
Created April 27, 2017 09:50
Minimal example of crash of nautilus extension and seafile_get_repo_list
// gcc -c -g test.c -o libnautilus-seafile.o -fPIC `pkg-config --cflags glib-2.0`;
// gcc -shared libnautilus-seafile.o -o libnautilus-seafile.so `pkg-config --libs libccnet libseafile`
#include <stdio.h>
#include <glib.h>
#include <searpc-client.h>
#include <ccnet.h>
#include <searpc.h>
#include <seafile/seafile.h>
@benruijl
benruijl / tutorial.ipynb
Last active May 15, 2024 08:23
Symbolica tutorial
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@benruijl
benruijl / GCD benchmark.md
Last active May 20, 2024 13:51
A benchmark for polynomial GCDs
Tool Timing (s)
Symbolica 4.1
Mathematica 89
Sympy 3663