Skip to content

Instantly share code, notes, and snippets.


Korvin Szanto KorvinSzanto

  • PortlandLabs
  • Portland Oregon
View GitHub Profile
View c5.api.postman.json
"info": {
"_postman_id": "e3ad840b-0fe8-42d2-976c-af3cbbb4d083",
"name": "c5 API",
"description": "concrete5's built in API",
"schema": ""
"item": [
"name": "oauth",
View gist:8e3a3ca13819f6f68b5620a48e4004c2
Verifying my Blockstack ID is secured with the address 14qmjte27BrpJCzBvBUNsg9rH47R15CJjG
# Do not run this as an sh file, take these command out and run them individually.
# Before you begin, set up a mysql or mariadb install
# I did this on the docker host machine because I wanted easy access to the mysql install.
# A better way would be to start up a mariadb docker instance and link into each zend server node.
# So lets node with port 10081 access
# You have to wait for this one to complete so that you can get the password it outputs
docker run -e MYSQL_HOSTNAME=MYSQL_HOSTNAME -e MYSQL_PORT=3306 -e MYSQL_USERNAME=root -e MYSQL_PASSWORD=password -e MYSQL_DBNAME=zend -e EXCLUDE_PORTS=10081,10082 -p 10081:10081 -p 81:80 --name node1 -t php-zendserver
# Add more nodes increasing the name and 8x port number
View global_area.php
public function display() {
$page = Page::getCurrentPage();
if(!$page->cID) {
$page = Page::getByPath("/page_not_found");
if(!$page->cID) {
$page = Page::getByID("/some_new_page");
parent::getOrCreate($page, $this->arHandle, 1);
KorvinSzanto / SampleController.php
Created Nov 5, 2014
Sample menu item implementation
View SampleController.php
namespace Sample\Menu\Item;
use Concrete\Core\Application\UserInterface\Menu\Item\ControllerInterface;
use Concrete\Core\Application\UserInterface\Menu\Item\ItemInterface;
use HtmlObject\Element;
class SampleController implements ControllerInterface
View gist:5d9e8a28a7d7c27c69a7
return array(
'debug' => array(
'display_errors' => true,
'detail' => 'debug'
View PHPtoICS.php
// Variables used in this script:
// $summary - text title of the event
// $datestart - the starting date (in seconds since unix epoch)
// $dateend - the ending date (in seconds since unix epoch)
// $address - the event's address
// $uri - the URL of the event (add http://)
// $description - text description of the event
// $filename - the name of this file for saving (e.g. my-event-name.ics)