This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <gtk/gtk.h> | |
typedef struct | |
{ | |
GtkWidget *window; | |
guint progress_id; | |
} WorkerData; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* License: GPLv2+ | |
* Author: Colomban Wendling <colomban@geany.org> | |
*/ | |
/* | |
* FIXME: improve function names (e.g. strvstrv doesn't simply do strstr anymore) | |
*/ | |
#include <stdlib.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Diffs 2 configuration files, sorting their content by sections to and key | |
# names to get a meaningful diff. | |
sed_escape() { | |
sed 's/[][/\\.$^]/\\\0/g' <<<"$1" | |
} | |
read_section_sorted() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* geany-run-helper.c - this file is part of Geany, a fast and lightweight IDE | |
* | |
* Copyright 2016 Colomban Wendling <ban(at)herbesfolles(dot)org> | |
* | |
* This program is free software; you can redistribute it and/or modify | |
* it under the terms of the GNU General Public License as published by | |
* the Free Software Foundation; either version 2 of the License, or | |
* (at your option) any later version. | |
* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -e | |
trap 'rm -f /tmp/get-type.txt geany-gtkdoc-tmp.h' EXIT INT QUIT TERM | |
# prepare the get-type list | |
cat > /tmp/get-type.txt <<EOF | |
get-type:stash_group_get_type | |
get-type:tm_source_file_get_type |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <gtk/gtk.h> | |
int | |
main (int argc, | |
char **argv) | |
{ | |
GObject *object; | |
GtkBuilder *builder; | |
GError *err = NULL; | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* ptimer.c | |
* A timer using POSIX API | |
* | |
* Copyright (c) 2005-2008, Colomban Wendling <ban@herbesfolles.org> | |
* All rights reserved. | |
* | |
* Redistribution and use in source and binary forms, with or without | |
* modification, are permitted provided that the following conditions are | |
* met: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
def path_inside(path, dir): | |
path = os.path.normpath(path) | |
dir = os.path.normpath(dir) | |
return os.path.commonprefix([path, dir]) == dir | |
def path_samepath(a, b): | |
return os.path.normpath(a) == os.path.normpath(b) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* old, one loop | |
* | |
* With not enough data (< 4096): | |
* mem_read (..., 1, 4096): 162.099252s (100000000 runs) | |
* mem_read (..., 4096, 1): 0.967107s (100000000 runs) | |
* With enough data (>= 4096): | |
* mem_read (..., 1, 4096): 2274.210934 (100000000 runs) | |
* mem_read (..., 4096, 1): 10.416469 (100000000 runs) | |
*/ |
NewerOlder