start new:
tmux
start new with session name:
tmux new -s myname
| <?php | |
| // front-end form example with multiple images upload | |
| // add new page created on the fly and adding images | |
| $message = ''; | |
| if($input->post->submit){ | |
| // tmp upload folder for additional security |
| <?php | |
| /** | |
| * ProcessWire (2.5) InputfieldFile front-end upload form example | |
| * Various workarounds to get it working with Errors for WireUpload | |
| * and removing files upload after error | |
| */ | |
| $sent = false; | |
| $upload_path = $config->uploadTmpDir; |
| <?php | |
| // front-end form example with multiple images upload | |
| // add new page created on the fly and adding images | |
| $message = ''; | |
| if($input->post->submit){ | |
| // tmp upload folder for additional security |
| <?php | |
| // get a page | |
| $editpage = $pages->get("/editme/"); | |
| $ignorefields = array("isOld","language_published"); | |
| $form = $modules->get("InputfieldForm"); | |
| $form->method = 'post'; | |
| $form->action = './'; |
| <?php | |
| namespace FixtureLoader; | |
| use Doctrine\Common\Persistence\Mapping\ClassMetadata; | |
| use Doctrine\Common\Persistence\ObjectManager; | |
| use Doctrine\Instantiator\Instantiator; | |
| class SimpleFixtureLoader | |
| { |
| #!/bin/bash | |
| # bash generate random alphanumeric string | |
| # | |
| # bash generate random 32 character alphanumeric string (upper and lowercase) and | |
| NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
| # bash generate random 32 character alphanumeric string (lowercase only) | |
| cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1 |
| <?php | |
| class FastForwarder | |
| { | |
| protected $skipWhen; | |
| protected $numDays; | |
| public static function createWithDays($num_days) | |
| { | |
| $ff = new static; |
| <?php | |
| /** | |
| * ProcessWire 'Hello world' demonstration module | |
| * | |
| * Demonstrates the Module interface and how to add hooks. | |
| * | |
| * See README file for further links regarding module development. | |
| * | |
| * ProcessWire 2.x |
| <?php | |
| use Phly\Conduit\Middleware; | |
| use Phly\Conduit\FinalHandler; | |
| use Phly\Conduit\Http\Request as RequestDecorator; | |
| use Phly\Conduit\Http\Response as ResponseDecorator; | |
| use Phly\Http\Response; | |
| use Phly\Http\Server; | |
| use Phly\Http\ServerRequestFactory; | |
| require __DIR__ . '/../vendor/autoload.php'; |