Skip to content

Instantly share code, notes, and snippets.

View larscwallin's full-sized avatar

Lars Wallin larscwallin

View GitHub Profile
@larscwallin
larscwallin / Bansai!
Last active October 13, 2015 23:18
Bansai! exports SVG from wonderous Inkscape to BonsaiJS template code. Still in Alpha but works as a proof of concept :)
Bansai!
* What is Bansai?
This is a script extension for Inkscape.It was inspired by the splendid BonsaiJS library. As well as
my lazy disposition, which does not like "coding" graphics ;)
So in short Bansai lets you select one or elements in Inkscape, and export them to BonsaiJS JSON notation.
* What is supported by this version?
A little, and still a lot :) At the moment I have had time to implement support for
@larscwallin
larscwallin / aspect.modx.json-schema.xslt
Created June 7, 2012 09:23
XPDO to JSON-SCHEMA XSLT
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output omit-xml-declaration="yes" />
<xsl:output method="text" />
<xsl:output indent="yes" />
<xsl:output media-type="text/plain" />
<xsl:param name="directory"/>
<xsl:param name="label-composite">Composites</xsl:param>
@larscwallin
larscwallin / README
Created January 23, 2012 12:09
SIMPLX UserManager
SIMPLX UserManager version 0.0.0.0.0.0.0.1
Helps you to get JSON encoded information from the MODx User related tables.
I use it to populate a TV dropdown with MODx users.
UPDATE 120123 13:17
Parameters:
@larscwallin
larscwallin / aspect.modx.extjs.xsl
Created November 30, 2011 15:39
SIMPLX Reflect
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output omit-xml-declaration="yes" />
<xsl:output method="text" />
<xsl:output indent="yes" />
<xsl:output media-type="text/plain" />
<xsl:param name="directory"/>
<xsl:param name="label-composite">Composites</xsl:param>
<xsl:param name="label-aggregate">Aggregates</xsl:param>
@larscwallin
larscwallin / README.txt
Created November 17, 2011 11:32
SIMPLX Widgeteer 0.8.5
SIMPLX Widgeteer 0.8.5
UPDATE 120117 10:04
Fixed a bug in the templateNSPlaceholder method thanks to Keith Baker :)
NEW FEAUTURES
If you use namespaced placeholders, you can now reference the first object in any list (array). This was not possible
before. This is going to be even easier later on as you are going to be able to query for objects using regex etc.
@larscwallin
larscwallin / a_readme.txt
Created November 9, 2011 09:49
SIMPLX MIRAGE
* WELCOME TO THE SIMPLX MIRAGE EXPERIMENT! *
PURPOSE:
The idea behind this little project is to hide the quite quirky MODx notion that a Resource (or document) does not
"own" its extended properties. In MODx these are called Template Variables and, as the name suggests, they are
bound to one or more Templates. This means that the normal concept that a Template conforms to the data in an Object
is reversed. As a result, in MODx a Resource potentially "looses" properties when a user changes its Template.
I want a solid way of using the current MODx Template Variable concept to quickly build custom content types
@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="";
@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 / 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){
@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{