Skip to content

Instantly share code, notes, and snippets.

@babab
babab / php-dumpdebug.php
Created November 9, 2015 14:36
Quickly dump a variable to a line in a file
<?php
function dumpdebug($data)
{
file_put_contents('/var/www/dumpdebug', $data . "\n", FILE_APPEND | LOCK_EX);
}
@babab
babab / ansicolors.py
Created December 14, 2013 19:14
ANSI colored output of strings
# Copyright (c) 2013 Benjamin Althues <benjamin@babab.nl>
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
@babab
babab / .gitignore
Created September 25, 2012 08:27
My first little Ada program
str_date
str_date.ali
str_date.o