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 | |
/** | |
* XMod\Common\CSV | |
* @link http://www.csvreader.com/csv_format.php | |
* @todo Might need option to replace characters like " with ' | |
* @todo Needs option to escape non printable characters | |
* Escape codes: \### and \o### Octal, \x## Hex, \d### Decimal, and \u#### Unicode | |
* @author David Neilsen <[email protected]> | |
*/ | |
namespace XMod\Format; |
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 | |
/** | |
* XMod\Common\Args | |
* | |
* @file | |
* @author David Neilsen <[email protected]> | |
*/ | |
namespace XMod\Common; | |
use IteratorAggregate; | |
use RecursiveIteratorIterator; |
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 | |
/** | |
* XMod\HTML\Tag | |
* | |
* @author David Neilsen <[email protected]> | |
*/ | |
namespace XMod\HTML; | |
use XMod\Common\Args; | |
/** |
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
class Counter { | |
private $counter = 0; | |
public function getCounter() | |
{ | |
return $this->counter; | |
} | |
public function incrementCounter() | |
{ |
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
// Get the current working directory | |
$current = getcwd(); | |
// An array of real paths of directories already run | |
$done = array(); | |
// Background processes | |
$processes = array(); | |
foreach ($directories as $directory) { |
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
<script type="text/javascript"> | |
raptor(function($) { | |
$('.editable').editor({ | |
urlPrefix: '/' | |
}); | |
}); | |
</script> <script type="text/javascript"> | |
jQuery(function($) { | |
$('.editable').editor({ | |
urlPrefix: '../', |
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
RewriteEngine on | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule ^(.*)$ index.php?parameter=$1 [NC] |
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="raptor-editable" data-id="main-content"> | |
<p> | |
Raptor may be integrated into a site many ways. | |
This article aims to cover the simplest integration possible. | |
</p> | |
</div> | |
<script> | |
$(function() { | |
$('.raptor-editable').raptor({ | |
plugins: { |
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 | |
// Disclaimer: this script is for test purposes only, it is not intended to be secure. | |
ini_set('display_errors', 1); | |
error_reporting(E_ALL); | |
if (isset($_POST['to']) && | |
isset($_POST['from']) && | |
isset($_POST['subject']) && | |
isset($_POST['message'])) { | |
$headers = 'From: ' . $_POST['from'] . PHP_EOL | |
. 'Reply-To: ' . $_POST['from'] . PHP_EOL |
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 | |
function backup($database, $path) { | |
if (!file_exists($path)) { | |
mkdir($path); | |
} | |
if (!is_dir($path)) { | |
echo 'Could not create directory: ' . $path . PHP_EOL; | |
return; | |
} | |
file_put_contents("$path/$database.timestamp", date('Y-m-d H:i:s')); |
OlderNewer