Skip to content

Instantly share code, notes, and snippets.

View larscwallin's full-sized avatar

Lars Wallin larscwallin

View GitHub Profile
@larscwallin
larscwallin / result.html
Created August 25, 2011 08:24
XPDO2HTML XSLT Script
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<html>
<head/>
<body class="xPDOObject" data-package="modx">
<form class="modAccess" name="modAccess">
<input type="hidden" name="class" value="modAccess"/>
<input type="hidden" name="extends" value="xPDOSimpleObject"/>
<input type="hidden" name="id" value=""/>
<fieldset>
<legend>modAccess</legend>
@larscwallin
larscwallin / simplx.http.php
Created August 26, 2011 15:31
SimplxRESTClient
<?php
interface ISimplxRestProxy{
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);
public function delete($res,$data);
@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"
@cowboy
cowboy / ba-backbone-module.js
Created September 9, 2011 18:05
Idea for a Backbone module system (allowing modules to be accessed across multiple files, possibly loaded out of order). Inspired by https://gist.github.com/1202511
/*!
* Backbone Module Manager - v0.1pre - 9/9/2011
* http://benalman.com/
*
* Copyright (c) 2011 "Cowboy" Ben Alman
* Dual licensed under the MIT and GPL licenses.
* http://benalman.com/about/license/
*/
function ModuleManager(fn) {
@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
@larscwallin
larscwallin / IModGenericMessage
Created September 14, 2011 15:58
simplx.request static class which wrapps the HTTP Request
<?php
/*
IModGenericMessage
A VERY abstract representation of a system/client request/response message.
The class is meant to normalize all types of inter-system communication for all protocols used.
*/
interface IModGenericMessage{
@larscwallin
larscwallin / mygit.modx.example.2.php
Created October 5, 2011 10:43
SIMPLX MyGit Version 0.1 Public Release. Wrapper for the Gist part of the http://developer.github.com/v3/gists/ API
<?php
require_once($modx->getOption('core_path').'components/simplx/mygit/simplx.mygit.php');
$action = isset($action) ? $action : '';
$username = isset($username) ? $username : '';
$password = isset($password) ? $password : '';
$object = isset($object) ? $object : '';
$objectid = isset($objectid) ? $objectid : '';
switch($action){
@liuwen-lvtu
liuwen-lvtu / tutorial.mkdn
Created October 18, 2011 03:19 — forked from mirisuzanne/tutorial.mkdn
A new Susy tutorial

Susy Tutorial

For this tutorial I'm assuming you are already comfortable with CSS, Sass (I'll use the SCSS syntax) and Compass. Please get set up with each one of those before attempting to use Susy. Sass and Compass both have their own setup instructions and tutorials that you can use.

There is also reference documentation in the works.

What Susy Does

CSS Systems

@larscwallin
larscwallin / simplx.jsonrpc.js
Created October 19, 2011 13:30
SIMPLX RPC - Super simple JavaScript implementation of JsonRPC.
<script src="https://github.com/douglascrockford/JSON-js/raw/master/json2.js"> </script>
<script type="text/javascript">
var simplx = new Object();
simplx.jsonrpc = (function(){
var response = null;
var self = this;
this.url="";
this.host="";