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
The extension is not finished (and probably will never be finished). If you have questions, feel free to send me an e-mail. | |
You can get the source from Github: | |
git clone https://github.com/derickr/vld.git vld | |
Here are the instructions to get it to work: | |
cd into the newly checked-out directory. | |
Create the configure script: phpize | |
Now run "./configure" followed by "make install". |
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
#!/usr/bin/env bash | |
echo "Enter Apache Virtual Host Name <ex: www.abc.com>:" | |
read _server_name | |
# The v3 file will sign a version 3 of the certificate and | |
# will fix the missing.SubjectAltName problem in Chrome | |
cat > "/etc/apache2/ssl/v3.ext" << EOF1 | |
authorityKeyIdentifier=keyid,issuer | |
basicConstraints=CA:FALSE | |
keyUsage = digitalSignature, nonRepudiation, keyEncipherment, dataEncipherment |
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 | |
class GeoData | |
{ | |
public $id; | |
public $propertyId; | |
public $ipaddress; | |
public $created; | |
public $returnVisit; | |
public $userAgentString; |
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 | |
// Builder Design Pattern | |
// Product | |
class SmartPhone | |
{ | |
public $cpu; | |
public $gpu; |
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 | |
// Explaining the Factory Method Pattern | |
abstract class Student | |
{ | |
public $name; | |
public $level; | |
// The factory method doesn't know which type of certificates to issue | |
// instead subclasses can define that type |
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
define('SESSION_SAVE_PATH', dirname(realpath(__FILE__)).DIRECTORY_SEPARATOR.'sessions'); | |
class MySessionHandler extends SessionHandler | |
{ | |
private $sessionName = 'MYSESS'; | |
private $sessionMaxLifeTime = 0; | |
private $sessionHTTPOnly = true; | |
private $sessionSecure = false; | |
private $sessionPath = '/'; |
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
<!DOCTYPE html> | |
<html> | |
<head lang="en"> | |
<meta charset="UTF-8"> | |
<title></title> | |
</head> | |
<body> | |
<script> | |
// Check if the Notification Object/Function exists | |
if("Notification" in window) { |
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 arStringLength($str) | |
{ | |
if(mb_detect_encoding($str) == 'UTF-8') { | |
$str = utf8_decode($str); | |
} | |
return strlen($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
<?php | |
if (!empty($_SERVER['HTTPS']) && ('on' == $_SERVER['HTTPS'])) { | |
$uri = 'https://'; | |
} else { | |
$uri = 'http://'; | |
} | |
$uri .= $_SERVER['HTTP_HOST']; | |
header('Location: '.$uri.'/xampp/'); | |
exit; | |
?> |
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
@charset utf-8; | |
/* | |
Eng. Mohammed Yehia Abdul Mottalib | |
CSS Reset | |
Note: This reset might and might not work for you so please | |
be sure to take some time to go through it before using it. I don't | |
use some tags like mark ins and so on so i excluded then from the list |
NewerOlder