Skip to content

Instantly share code, notes, and snippets.

@a3020
a3020 / Editor.php
Created August 25, 2017 08:54
Service Provider class for a custom CKEditor configuration (concrete5 8.x)
<?php
namespace Concrete\Package\XXX\Src\Support;
use Concrete\Core\Editor\CkeditorEditor;
use Concrete\Core\Editor\Plugin;
use Concrete\Core\Editor\PluginManager;
use Concrete\Core\Foundation\Service\Provider as ServiceProvider;
/**
* $editor = Core::make('simple_editor');
@a3020
a3020 / reinstall_c5.sh
Last active May 3, 2018 11:26
Reinstall concrete5
#!/bin/sh
REPO_PATH=concrete5-develop
DB_HOST=localhost
DB_USER=root
DB_PASS=
DB_DBAS=concrete5
ADMIN_EMAIL=no-reply@localhost
@a3020
a3020 / gist:6154084
Created August 5, 2013 07:37
$im->getThumbnail()
$r = $im->getThumbnail($obj, $width, $height, $crop = false)
Returns a path to the specified item, resized to meet max width and height. $obj can either be a string (path) or a file object. Returns a PHP object with the following properties set
src - the relative path to the image (useful for display in browsers)
width - the new width of the image
height - the new height of the image
crop - crop image if dimensions exceed
@a3020
a3020 / gist:6154071
Created August 5, 2013 07:32
$im->outputThumbnail()
$im->outputThumbnail($obj, $maxWidth, $maxHeight, $alt = null, $return = false, $crop = false)
Runs getThumbnail on the $obj argument, and prints out or returns an IMG tag.
#import <UIKit/UIKit.h>
@interface status : NSObject {
NSNumber* _id;
NSString* _unomas;
NSNumber* _minutes;
NSNumber* _hours;
NSNumber* _days;
NSString* _naam;
NSString* _date;