Skip to content

Instantly share code, notes, and snippets.

@larscwallin
larscwallin / simplx.http.php
Created September 7, 2011 08:40
simplx.http
<?php
interface ISimplxHTTPProxy{
public function setBaseURL($url);
public function setServiceURI($uri);
public function login($usn,$psw);
public function logout();
public function get($res,$data);
public function post($res,$data);
public function patch($res,$data);
public function put($res,$data);
@larscwallin
larscwallin / result.js
Created September 8, 2011 09:49
XPDO to simple ExtJS 3 Stores
var SimplxStudio = {};
SimplxStudio.modx = {};
/* Creating JSON representation for modAccess */
SimplxStudio.modx.modAccess={
"class": "modAccess",
"extends":"xPDOSimpleObject",
"fields": [
"id","alias","target","principal_class","principal","authority","policy"
@larscwallin
larscwallin / README.txt
Created September 14, 2011 14:02
simplx.controller, now with url routing
SIMPLX Controller V0.7
UPDATE 111109
NEW FEATURES:
- Added a whole bunch of modResource fields to the Request object. This means that you can route on stuff like:
pagetitle
template
@splittingred
splittingred / install.sh
Created September 22, 2011 21:35
Bash script to install a new MODX Revolution 2.2+ install via CLI
Examples of above script:
# into a standard directory, where config.xml resides in the current working directory
sh install.sh /home/modx/public_html/
# with a custom config.xml file
sh install.sh /home/modx/public_html/ /opt/local/modx/config.xml
@opengeek
opengeek / plugin.RemoteCommands.php
Created October 4, 2011 14:48
RemoteCommands and SendClearCache plugins for MODX Revolution 2.2+
<?php
/* RemoteCommands plugin -- register with OnHandleRequest OR OnWebPageComplete event */
/* define the IP of the master instance which does not need to execute remote commands */
$master_instance = $modx->getOption('master_instance', $scriptProperties, '127.0.0.1');
/* get the instance IP */
$instance = $_SERVER['SERVER_ADDR'];
/* the number of seconds the remote command is valid for */
@oksushi
oksushi / migx_modx-2.2.diff
Created October 6, 2011 04:43 — forked from mkschell/migx_modx-2.2.diff
MIGX diff for MODX2.2
--------------- core/components/migx/elements/tv/input/migx.php ---------------
index 11a9c2d..53370a5 100644
@@ -133,6 +133,7 @@ $lang = $this->xpdo->lexicon->fetch();
$lang['mig_add'] = !empty($properties['btntext'])?$properties['btntext']:$lang['mig_add'];
$modx->smarty->assign('i18n', $lang);
$this->xpdo->smarty->assign('properties', $properties);
+$this->xpdo->smarty->assign('resource', is_object($this->xpdo->resource) ? $this->xpdo->resource->toArray() : array());
$this->xpdo->smarty->assign('pathconfigs', $this->xpdo->toJSON($pathconfigs));
$this->xpdo->smarty->assign('columns', $this->xpdo->toJSON($cols));
$this->xpdo->smarty->assign('fields', $this->xpdo->toJSON($fields));
@hileon
hileon / gist:1311735
Created October 25, 2011 07:39 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Windows)

General

Ctrl+KB toggle side bar
Ctrl+Shift+P command prompt
Ctrl+` python console
Ctrl+N new file

Editing

@mklabs
mklabs / bootstrap-plugins.txt
Created December 2, 2011 11:23
h5bp + twitter bootstrap integration
bootstrap-tooltip.js
bootstrap-popover.js
bootstrap-alert.js
bootstrap-button.js
bootstrap-carousel.js
bootstrap-collapse.js
bootstrap-dropdown.js
bootstrap-modal.js
bootstrap-scrollspy.js
bootstrap-tab.js
@bfncs
bfncs / defaultTemplateByParentTv.plugin.php
Created December 13, 2011 23:55
Default Children Template by Parent TV - modX Revolution Plugin
<?php
/**
* =========================
* defaultTemplateByParentTv
* =========================
*
* Plugin for modX Revolution
* Set default template for children of a ressource
*
* Author:
@rosstimson
rosstimson / modx-git-bootstrap.sh
Created December 20, 2011 18:01
Quickly Bootstrap MODX (Revo) from Git Repo
#!/bin/sh
# Request and read in db details from user
echo "Please enter your database hostname
(e.g. localhost) and press [ENTER]:"
read db_host
echo "Please enter your MODX database name and press [ENTER]:"
read db_name
echo "Please enter your MODX database user and press [ENTER]:"
read db_user