Skip to content

Instantly share code, notes, and snippets.

View codebrainz's full-sized avatar

Matthew Brush codebrainz

View GitHub Profile
@codebrainz
codebrainz / license.txt
Last active March 6, 2024 00:14
MJPEG Player in JavaScript
Copyright 2015 Matthew Brush
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

Callbacks Handlers

  • Signal connections should be done using GtkBuilder/Glade where possible. If you're moving any manual GUI building code to the GtkBuilder file, you should ensure to move the signal connections there where possible (ex. where you don't need special user_data that cannot be set through Glade).

  • If you're making a callback handler for any non-GtkBuilder-related signals place the handler nearby (ex. directly above) the function that uses it. For

@codebrainz
codebrainz / gist:1562301
Created January 4, 2012 21:39
Simple bounded queue
/*
* A very basic (and fast) fixed-sized queue data structure.
*
* Author: Matthew Brush <mbrush@codebrainz.ca>
* License: GNU Lesser General Public License, version 2.1
* Edit Date: January 4th, 2011
*/
#include <stdlib.h>
#include "fixedqueue.h"
@alpinechough
alpinechough / NotebookTabLabel.cs
Created January 26, 2011 22:03
Gtk Notebook Tab Label with Close Button
// Copyright (c) 2010 Alpine Chough Software.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in