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
alert('Jonathan'); |
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
auto lo | |
iface lo inet loopback | |
iface eth0 inet dhcp | |
auto wlan0 | |
allow-hotplug wlan0 | |
iface wlan0 inet static | |
wpa-ssid "XXXXXXXXXXX" |
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
<?php | |
define ("SERIAL_DEVICE_NOTSET", 0); | |
define ("SERIAL_DEVICE_SET", 1); | |
define ("SERIAL_DEVICE_OPENED", 2); | |
/** | |
* Serial port control class | |
* | |
* THIS PROGRAM COMES WITH ABSOLUTELY NO WARANTIES ! | |
* USE IT AT YOUR OWN RISKS ! |
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
(StartDate1 <= EndDate2) and (StartDate2 <= EndDate1) |
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
<?php | |
function output ( $str, $tabs = 0, $date = TRUE, $silent = FALSE ) | |
{ | |
// Silent echo's | |
if( !empty($silent)) | |
{ | |
return FALSE; | |
} | |
if( is_array($str)) |
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
function emptySet(x) { | |
return false; | |
} | |
function insert(elem, set) { | |
return function(x) { | |
if (x === elem) { // insert smarter comparison here if needed | |
return true; | |
} | |
return function() { return contains(x, set); }; |
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
<?php | |
/* ---------------------------------------------------------- */ | |
/* minibots.class.php Ver.1.9g */ | |
/* ---------------------------------------------------------- */ | |
/* Mini Bots class is a small php class that allows you to */ | |
/* use some free web seriveces online to retrive usefull data */ | |
/* and infos. This version includes: */ | |
/* smtp validation, check spelling, meteo, exchange rates, */ | |
/* shorten urls, and geo referencing with IP address and more */ | |
/* Feel free to use in your applications, but link my blog: */ |
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
<?php | |
function cleanForShortURL($toClean) { | |
$charactersToRemove = array( | |
'Š'=>'S', 'š'=>'s', 'Ð'=>'Dj','Ž'=>'Z', 'ž'=>'z', 'À'=>'A', 'Á'=>'A', 'Â'=>'A', 'Ã'=>'A', 'Ä'=>'A', | |
'Å'=>'A', 'Æ'=>'A', 'Ç'=>'C', 'È'=>'E', 'É'=>'E', 'Ê'=>'E', 'Ë'=>'E', 'Ì'=>'I', 'Í'=>'I', 'Î'=>'I', | |
'Ï'=>'I', 'Ñ'=>'N', 'Ò'=>'O', 'Ó'=>'O', 'Ô'=>'O', 'Õ'=>'O', 'Ö'=>'O', 'Ø'=>'O', 'Ù'=>'U', 'Ú'=>'U', | |
'Û'=>'U', 'Ü'=>'U', 'Ý'=>'Y', 'Þ'=>'B', 'ß'=>'Ss','à'=>'a', 'á'=>'a', 'â'=>'a', 'ã'=>'a', 'ä'=>'a', | |
'å'=>'a', 'æ'=>'a', 'ç'=>'c', 'è'=>'e', 'é'=>'e', 'ê'=>'e', 'ë'=>'e', 'ì'=>'i', 'í'=>'i', 'î'=>'i', |
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
<?php | |
interface IException | |
{ | |
/* Protected methods inherited from Exception class */ | |
public function getMessage(); // Exception message | |
public function getCode(); // User-defined Exception code | |
public function getFile(); // Source filename | |
public function getLine(); // Source line | |
public function getTrace(); // An array of the backtrace() | |
public function getTraceAsString(); // Formated string of trace |
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
<?php | |
function generatePassword ($length = 8) { | |
$password = ""; | |
$possible = "2346789bcdfghjkmnpqrtvwxyzBCDFGHJKLMNPQRTVWXYZ"; | |
$maxlength = strlen($possible); | |
// check for length overflow and truncate if necessary | |
if ($length > $maxlength) { | |
$length = $maxlength; |