Skip to content

Instantly share code, notes, and snippets.

View KorvinSzanto's full-sized avatar

Korvin Szanto KorvinSzanto

  • PortlandLabs
  • Portland Oregon
View GitHub Profile
[package]
name = "serial-test"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
serialport = "4.1.0"
{
"info": {
"_postman_id": "e3ad840b-0fe8-42d2-976c-af3cbbb4d083",
"name": "c5 API",
"description": "concrete5's built in API",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
{
"name": "oauth",
Verifying my Blockstack ID is secured with the address 14qmjte27BrpJCzBvBUNsg9rH47R15CJjG https://explorer.blockstack.org/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
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);
parent::display($page);
@KorvinSzanto
KorvinSzanto / SampleController.php
Created November 5, 2014 23:39
Sample menu item implementation
<?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
{
<?php
return array(
'debug' => array(
'display_errors' => true,
'detail' => 'debug'
)
);
<?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)
//