Skip to content

Instantly share code, notes, and snippets.

View benruijl's full-sized avatar

Ben Ruijl benruijl

View GitHub Profile
*.html
@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 / 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 / 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));
}
==> Starting build()...
patching file backend/src/cnij_backend_common.c
processing .
Running libtoolize...
libtoolize: putting auxiliary files in `.'.
libtoolize: copying file `./ltmain.sh'
libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.in and
libtoolize: rerunning libtoolize, to keep the correct libtool macros in-tree.
libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
Running aclocal ...
@benruijl
benruijl / gist:3325011
Created August 11, 2012 14:44
Compiler error cnijfilter-mp280
ake[2]: Entering directory `/tmp/packerbuild-0/cnijfilter-mp280/cnijfilter-mp280/src/cnijfilter-source-3.40-1/cngpij/cngpij'
gcc -DHAVE_CONFIG_H -I. -I.. -O2 -Wall -I../include/cncl -I../include/misc -I../../libs/paramlist -O2 -MT bjcups.o -MD -MP -MF .deps/bjcups.Tpo -c -o bjcups.o bjcups.c
bjcups.c: In function 'getDeviceURI':
bjcups.c:691:11: error: dereferencing pointer to incomplete type
bjcups.c:692:11: error: dereferencing pointer to incomplete type
bjcups.c:701:17: error: dereferencing pointer to incomplete type
bjcups.c:706:27: error: dereferencing pointer to incomplete type
bjcups.c:709:45: error: dereferencing pointer to incomplete type
bjcups.c:710:30: error: dereferencing pointer to incomplete type
bjcups.c:716:45: error: dereferencing pointer to incomplete type
@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' ');