Skip to content

Instantly share code, notes, and snippets.

@Bouke
Bouke / snippet-singleton.php
Created August 16, 2010 09:39
Singleton Snippet
class ${ClassName} {
protected static $instance;
/**
* Returns an instance of this Singleton
* @return ${ClassName}
*/
public static function getInstance() {
if(!isset(self::$instance)) {
self::$instance = new self();
@Bouke
Bouke / Batch-import-into-GitHub-from-flyspray.php
Created May 4, 2010 00:00
import issues from flyspray into github
<?php
/**
* Example database from flyspray
*
* @author Bouke Haarsma <[email protected]>
*/
mysql_connect("localhost", "(user)", "(pass)");
mysql_select_db("(db)");