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 department page tree | |
| $pl = $this->modules->get("ProcessPageList"); | |
| $pl->set('id',$page->id); | |
| echo $pl->execute(); |
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 | |
| $admin = $users->get('admin'); | |
| $admin->setOutputFormatting(false); | |
| $admin->pass = 'yo12345'; // put in your new password | |
| $admin->save(); |
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
| stylus --watch -u jeet -u rupture styles.styl |
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 | |
| /* | |
| LOGIN | |
| <? require("./includes/login.php");?> | |
| LOGOUT | |
| <a href="?logout=1">Logout</a> | |
| */ |
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 | |
| /** | |
| * Front-end upload form example | |
| * using ProcessWire Inputfields | |
| */ | |
| $sent = false; | |
| $upload_path = $config->paths->assets . "files/.tmp_uploads/"; |
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 | |
| /** | |
| * ALIAS CREATION | |
| * add this to the home template - make sure home template has url segments enabled. | |
| * | |
| * | |
| * $alias = $pages->get("title=alias"); | |
| * // echo $alias->children(); | |
| * foreach ($alias->children as $p) { | |
| * |
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 debug ($data) { | |
| echo "<script>\r\n//<![CDATA[\r\nif(!console){var console={log:function(){}}}"; | |
| $output = explode("\n", print_r($data, true)); | |
| foreach ($output as $line) { | |
| if (trim($line)) { | |
| $line = addslashes($line); | |
| echo "console.log(\"{$line}\");"; | |
| } |
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
| python -m SimpleHTTPServer 8000 |
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 | |
| // read more -> http://www.php.net/manual/en/features.http-auth.php | |
| if (!isset($_SERVER['PHP_AUTH_USER']) || $_SERVER['PHP_AUTH_USER'] != 'foo' || $_SERVER['PHP_AUTH_PW'] != 'bar') { | |
| header('WWW-Authenticate: Basic realm="My Realm"'); | |
| header('HTTP/1.0 401 Unauthorized'); | |
| echo 'Unauthorized'; | |
| exit; | |
| } | |
| ?> |
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 | |
| /** | |
| * Front-end upload form example | |
| * using ProcessWire Inputfields | |
| */ | |
| $sent = false; | |
| $upload_path = $config->paths->assets . "files/.tmp_uploads/"; |