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
Day: <input type="text" name="day" id="day" value ="5" /> | |
<hr> | |
Month: <input type="text" name="month" id="month" value ="12" /> | |
<hr> | |
Year: <input type="text" name="year" id="year" value ="1972" /> | |
<hr> | |
Birthday: <span id="birthday">?</span> | |
<hr> | |
Today: <span id="todayIs">?</span> | |
<hr> |
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 percentChange($oldNos = 0, $newNos = 0) { | |
$scratchSheet = ($newNos + 0) - ($oldNos + 0); | |
return round((($scratchSheet / $oldNos) * 100),2); | |
} | |
?> |
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 | |
$headers = apache_request_headers(); | |
foreach ($headers as $header => $value) { | |
echo "$header: $value <br />\n"; | |
} | |
?> |
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 | |
require('facebook.php'); | |
$facebook = new Facebook(array( | |
'appId' => 'YOUR_APP_ID', | |
'secret' => 'YOUR_APP_SECRET', | |
)); | |
$cokeFans = $facebook->api('/cocacola'); |
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 createQR($url,$size ='150',$evLevel='L',$margin='0') { | |
$url = urlencode($url); | |
return '<img src="http://chart.apis.google.com/chart?chs=' . $size . 'x' . $size . '&cht=qr&chld=' . $evLevel . '|' . $margin . '&chl=' . $url . '" alt="QR code" width="' . $size . '" height="' . $size . '"/>'; | |
} | |
echo createQR('http://www.wickedbrilliant.com',150); |
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 | |
/** | |
* SplClassLoader implementation that implements the technical interoperability | |
* standards for PHP 5.3 namespaces and class names. | |
* | |
* http://groups.google.com/group/php-standards/web/final-proposal | |
* | |
* // Example which loads classes for the Doctrine Common package in the | |
* // Doctrine\Common namespace. | |
* $classLoader = new SplClassLoader('Doctrine\Common', '/path/to/doctrine'); |
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 ">>> Installing Mailhog" | |
# Download binary from github | |
wget --quiet -O ~/mailhog https://github.com/mailhog/MailHog/releases/download/v0.2.1/MailHog_linux_amd64 | |
# Make it executable | |
chmod +x ~/mailhog |
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
/* eZLog class very slightly modified from eZ Publish 4.3 */ | |
class eZLog { | |
const MAX_LOGROTATE_FILES = 3; | |
const MAX_LOGFILE_SIZE = 204800; // 200*1024 | |
/*! | |
Creates a new log object. | |
*/ | |
function eZLog( ) | |
{ | |
} |
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 | |
// Load WordPress functions | |
require('wp-load.php'); | |
$post = get_page($_REQUEST["id"]); | |
$id = $post->ID; | |
$withcomments = true; | |
$comments = getWPcomments(); |
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 | |
add_filter( 'manage_posts_columns', 'your_custom_cols' ); //Filter out Post Columns with 2 custom columns | |
function your_custom_cols($defaults) { | |
$defaults['language'] = __('Language'); //Language and Films is name of column | |
$defaults['film'] = __('Films'); | |
return $defaults; | |
} |
OlderNewer