Skip to content

Instantly share code, notes, and snippets.

@optilude
optilude / gist:2290187
Created April 3, 2012 07:32
Trying out the theme mapper
Clone the repository in Git:
$ git clone [email protected]:plone/plone.app.theming.git
$ cd plone.app.theming
$ git checkout optilude-ace
Optional: Use plone-devstart to bootstrap
$ curl -O https://raw.github.com/plone/plone-devstart/master/plone-devstart.py
$ python2.6 plone-devstart.py --version=4.1.3
@optilude
optilude / login.txt
Created August 11, 2012 22:09
Using robotframework with Plone
*** Settings ***
Documentation A test suite with a single test for valid login. This test has
... a workflow that is created using keywords from the resource file.
Resource resource.txt
*** Test Cases ***
Valid Login
γ bin/instance fg
2012-09-22 23:26:07 INFO ZServer HTTP server started at Sat Sep 22 23:26:07 2012
Hostname: 0.0.0.0
Port: 8080
2012-09-22 23:26:09 WARNING SecurityInfo Conflicting security declarations for "setText"
2012-09-22 23:26:09 WARNING SecurityInfo Class "ATTopic" had conflicting security declarations
2012-09-22 23:26:11 WARNING ZODB.blob (3789) Blob dir /Users/optilude/Development/Plone/buildout.deco/var/blobstorage/ has insecure mode setting
2012-09-22 23:26:15 WARNING collective.quickupload.interfaces Importing interfaces from collective.quickupload.browser.interfaces is deprecated, please import from collective.quickupload.interfaces
Traceback (most recent call last):
File "/Users/optilude/.buildout/eggs/Zope2-2.13.16-py2.7.egg/Zope2/Startup/run.py", line 76, in <module>
@optilude
optilude / gist:3885011
Created October 13, 2012 15:32
Draft test cases for plone.app.theming
# Theme control panel
Scenario: Preview theme
Given a logged-in admin user
And a Plone site with no theme applied
When I navigate to the "Theming" control panel
And I click on the "Example theme" theme preview
Then a preview of "Example theme" is shown in a new window
Scenario: Activate theme
@optilude
optilude / gist:4415546
Created December 30, 2012 22:13
Error running any easy_install or setup.py install on my ReadyNas Duo with the Python 2.7 package
nas:~# easy_install -U flickrbackup
Searching for flickrbackup
Reading http://pypi.python.org/simple/flickrbackup/
Reading http://github.com/optilude/flickrbackup
Best match: flickrbackup 0.2
Downloading http://pypi.python.org/packages/source/f/flickrbackup/flickrbackup-0.2.tar.gz#md5=f39fc9dfe59118faeb3d28198b5c282d
Processing flickrbackup-0.2.tar.gz
Writing /tmp/easy_install-bJ7azw/flickrbackup-0.2/setup.cfg
Running flickrbackup-0.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-bJ7azw/flickrbackup-0.2/egg-dist-tmp-pf04QD
warning: install_lib: 'build/lib.linux-padre-2.7' does not exist -- no Python modules to install
// Set the require.js configuration for your application.
require.config({
// Load common paths and shims and then load the main.js bootstrap script
deps: [
'require.config',
'app/main'
]
});
@optilude
optilude / buster.js
Last active December 12, 2015 09:28
buster.js test with debugger
var config = module.exports;
config["Client"] = {
autoRun: false,
rootPath: "../",
environment: "browser",
libs: [
'public/vendor/libs/require.js',
'public/require.config.js'
],
@optilude
optilude / plugins.js
Last active March 27, 2017 19:58
Simple validation framework for Handsontable
define([
'jquery',
'underscore',
'app/app',
'jquery.handsontable',
'moment',
'jquery.tools'
], function($, _, app, Handsontable, moment) {
@optilude
optilude / Model definitions
Last active December 19, 2015 00:59
Test database for joins
module.exports = function(sequelize, DataTypes) {
return sequelize.define("allocation", {
// Foreign keys: project
name: {
type: DataTypes.STRING,
allowNull: false
},
code: {
type: DataTypes.STRING,
allowNull: false