Skip to content

Instantly share code, notes, and snippets.

@wabson
wabson / actions-common.get.html.ftl
Created October 25, 2012 13:43
Web script extension controller to add additional action(s) to data list items
<@link rel="stylesheet" type="text/css" href="${url.context}/res/myco/components/data-lists/sample-action.css" group="datalists" />
<@script type="text/javascript" src="${url.context}/res/myco/components/data-lists/sample-action.js" group="datalists"></@script>
@wabson
wabson / my-alfresco-embed.php
Created November 10, 2012 23:12
WordPress plugin to embed document views from Alfresco Cloud
<?php
/*
Plugin Name: My Alfresco Embeds
Plugin URI: http://my.alfresco.com/
Description: Embed documents from Alfresco Cloud in a blog post
Author: Sergio Buitrago, Will Abson
Version: 0.0.1
Author URI: http://my.alfresco.com/
*/
@wabson
wabson / test-cmis-relationships.py
Created February 19, 2013 18:20
Test code to examine CMIS relationship targetId values before and after uploading a file via Share. Requires [cmislib](https://chemistry.apache.org/python/cmislib.html) 0.5.1 or greater and the files `alfresco.sh`, `ping.py` and `MultipartPostHandler.py` from the latest version of [share-import-export](http://code.google.com/p/share-import-export/)
import cmislib
import alfresco
import base64
filename = '/Users/wabson/Desktop/Screen Shot 2012-11-27 at 11.50.42.png'
cmisurl = 'https://api.alfresco.com/cmis/versions/1.0/atom'
access_token = 'xxxxxxxx' # Currently active access token
salesforce_site = 'will-salesforce'
record_id = '006b0000002YoDJ'
shareurl = 'https://my.alfresco.com/share'
@wabson
wabson / web-preview.get.config.xml
Created February 28, 2013 14:26
Sample configuration to enable the Media Viewers 2.x viewer plug-ins in Alfresco Share. This is only needed on Alfresco 4.0 and 4.1, since newer versions can use the supplied extensibility modules which supply this same configuration.
<config>
<!--
List of rule to decide which plugin that shall be used to preview the node's content or thumbnails.
The list is evaluated from the top.
All attributes for a condition must match.
When a condition matches the nodes' mimeType and/or thumbails its list of plugins are tested from the top.
Every plugin will be created and get an opportunity to decide if it may be used in the users browser environment.
If the plugin can't be used it will give a report back to the user that will be displayed if neither of the
plugins in the list can be used.
<alfresco-config>
<config evaluator="string-compare" condition="Remote">
<remote>
<endpoint>
<id>chatter-api</id>
<name>Chatter REST API</name>
<connector-id>oauth2-header</connector-id>
<endpoint-url>https://alfresco.my.salesforce.com</endpoint-url>
<client-id>3MVG9rFJvQRVOvk5W_CrNgQGmoMhFjPC9PwFpIjLhSg7NbTgFtylPj3On557sgBstlxXsG.Xr2wQqfNkdMfKy</client-id>
@wabson
wabson / build.xml
Last active December 28, 2015 08:49
Share Extras common build scripts - used across all Share Extras projects which are built with Ant. File build.xml should not contain any project-specific code, but this can be placed in project.xml if it is necessary to add new targets or override existing targets.To run the build call `ant` or `ant -f project.xml`. You do not need to supply a …
<!--
***********************************
Share Extras build script
***********************************
Author: Will Abson
Version: 1.6.2
Provides a set of targets for building extensions to Alfresco Share in ZIP, AMP and JAR archive
@wabson
wabson / map.geojson
Last active December 29, 2015 15:19
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wabson
wabson / Code.js
Last active January 1, 2016 20:19
Hasler Race Management implementation on top of Google Spreadsheets, for GB Marathon Canoeing Hasler Series races
/*
* Hasler Race Management Spreadsheet functions
*
* Author: Will Abson
*
* These are designed to be called from a Spreadsheet or from a webapp (TODO: provide doGet() function to implement this)
*/
/**
* Rankings sheet column names
#!/usr/bin/env python
import getpass
import json
import sys
import urllib
import urllib2
#AUTOMATION_PLAN = "ALF-SHAREPO12" # Share-PO Tests > HEAD-BUG-FIX (Maven)
AUTOMATION_PLAN = "ALF-SHAREPO0" # Share-PO Tests > HEAD-BUG-FIX
@wabson
wabson / functions.py
Created December 8, 2015 11:08
Richmond CC extensions to Ninja forms
<?php
add_shortcode( 'ninja_forms_paypal', 'ninja_forms_paypal_shortcode' );
function ninja_forms_paypal_shortcode( $atts ){
global $ninja_forms_processing;
extract( shortcode_atts(
array(
'ref' => null,
'amount_field' => null,
'currency' => 'GBP',