This file contains hidden or 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
<div class="addthis_toolbox addthis_default_style addthis_32x32_style" style="height:85px;"> | |
<a class="addthis_button_facebook"></a><!--FB share has issues with title and desc--> | |
<a class="addthis_button_twitter"></a> | |
<a class="addthis_button_pinterest_share"></a> | |
<a class="addthis_button_email"></a> | |
<a class="addthis_button_google_plusone_share"></a> | |
<a class="addthis_button_compact"></a> | |
</div> | |
This file contains hidden or 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 | |
// Set base database name | |
$DATABASE = 'sample'; | |
// Automatically create primary key column for tables? | |
$AUTOSERIAL = true; | |
// Create log of changes (for advanced schema only) | |
$CHANGELOG = true; |
This file contains hidden or 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 | |
//example config as ref | |
$conf = ' | |
// Set base database name | |
$DATABASE = "sample"; | |
// Automatically create primary key column for tables? | |
$AUTOSERIAL = true; |
This file contains hidden or 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
@font-face { | |
font-family:'PTSerifCustom'; | |
src:url('../font/PTF55F_W.eot'); | |
src:url('../font/PTF55F_W.eot?#iefix') format('embedded-opentype'), url('../font/PTF55F_W.woff') format('woff'), url('../font/PTF55F_W.ttf') format('truetype'); | |
font-weight:normal; | |
font-style:normal | |
} | |
@font-face { | |
font-family:'PTSerifCustom'; | |
src:url('../font/PTF56F_W.eot'); |
This file contains hidden or 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> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<title></title> | |
<link rel="stylesheet" href="modal.css"> | |
</head> | |
<body> | |
<h1><a class="js-modal-trigger" data-target-modal="#js-modal-1" href="javascript:;">Trigger Modal 1</a></h1> |
This file contains hidden or 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 | |
$arg = 'T'; | |
$vehicle = ( $arg == 'B' ) ? 'bus' : | |
( $arg == 'A' ) ? 'airplane' : | |
( $arg == 'T' ) ? 'train' : | |
( $arg == 'C' ) ? 'car' : | |
( $arg == 'H' ) ? 'horse' : | |
'feet'; | |
echo $vehicle; |
This file contains hidden or 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 | |
$data_arr = array_map("str_getcsv", preg_split('/\r*\n+|\r+/', file_get_contents("path/to/csv-file.csv"))); | |
//or | |
$data_arr = array_map("str_getcsv", file("path/to/csv-file.csv"))); |
This file contains hidden or 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 | |
//https://www.inanimatt.com/php-curl.html | |
// See https://lazycat.org/php-curl.html for license & known issues | |
// P.S. You'd better have a very good reason for using this instead of http://guzzlephp.org/ | |
function httpGet($url, $ttl = 86400) | |
{ | |
/* Change this or make it an option as appropriate. If you're | |
* getting urls that shouldn't be visible to the public, put the |
This file contains hidden or 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 | |
/** | |
* nested ternary quirk | |
*/ | |
// will echo f not t, left to right association | |
echo true? 't' : false? 'f' | |
: 't'; |
This file contains hidden or 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 | |
/** | |
* http://www.php.net/manual/en/ini.list.php | |
*/ | |
//PHP_INI_PERDIR Entry can be set in php.ini, .htaccess, httpd.conf or .user.ini (since PHP 5.3) | |
//PHP_INI_SYSTEM Entry can be set in php.ini or httpd.conf | |
//PHP_INI_ALL Entry can be set anywhere |