Skip to content

Instantly share code, notes, and snippets.

Avatar

Michael Müller cmichi

View GitHub Profile
View keybase.md

Keybase proof

I hereby claim:

  • I am cmichi on github.
  • I am cmichi (https://keybase.io/cmichi) on keybase.
  • I have a public key ASA8usPptGEMn6Gas6s9TUCx8eq2gsu_Fzr93c7fkb7uYQo

To claim this, I am signing this object:

@cmichi
cmichi / get-xbm-pixel.c
Created Mar 16, 2011
Function which returns the pixel color for a XBM (X BitMap) Image
View get-xbm-pixel.c
/*
* returns the pixel color for a XBM (X BitMap) image.
*
* XBM is a plain text monochrome image format that takes the form of
* C source code. images can directly be compiled into an application.
*
*/
static int is_black(int x, int y, int img_width, int img_height)
{
char byte_containing_px;
@cmichi
cmichi / jQuery-file-exists.js
Created Nov 30, 2010
Very simple way to check if a file exists, using jQuery.
View jQuery-file-exists.js
/**
* Very simple way to check if a file exists on this domain.
* Use with the jQuery library.
*
* Important: Works only on the same domain.
* Cross-domain-requests have to be done in another way (see JSONP)!
*
* Use: console.log( "/data/list.json".fileExists() );
*/
String.prototype.fileExists = function() {