Skip to content

Instantly share code, notes, and snippets.

@tomgross
tomgross / gist:4956024
Created February 14, 2013 20:19
Plone HTML5 calendar_macros. Be careful! This does not work aout of the box. It needs a slightly modified date_components_support-view and process_form-method of the widget.
<html xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
i18n:domain="plone">
<body>
<tal:comment tal:condition="nothing">
The calendar date picker.
</tal:comment>
@tomgross
tomgross / buildout.cfg
Last active December 17, 2015 10:49
Failing Plone Migration (https://dev.plone.org/ticket/13584)
[buildout]
newest = false
extends =
http://dist.plone.org/release/3.3.5/versions.cfg
parts =
zope2
instance
[zope2]
@tomgross
tomgross / gist:6054493
Created July 22, 2013 14:59
VS PyTools MSbuild error
Overall Build Process
00:00
Update Build Number
00:02
Run On Agent (reserved build agent Default Agent - ASARA156)
00:00
Create Workspace
00:00
Get Workspace
@tomgross
tomgross / gist:7256426
Last active December 27, 2015 02:59
operationsmanager control
/* XXX Post to TFS */
function follow_href(title) {
$('a[title="' + title + '"]').click(function() {
window.location = $(this).attr("href");
});
$('a[title="' + title + '"]').trigger('click');
}
Running Products.PloneTestCase.layer.PloneSite tests:
Set up Testing.ZopeTestCase.layer.ZopeLite in 0.920 seconds.
Set up Products.PloneTestCase.layer.ZCML <module 'plone.dexterity.fti' from '/home/tom/eggs/plone.dexterity-2.2.3-py2.7.egg/plone/dexterity/fti.pyc'>
in 10.251 seconds.
Set up Products.PloneTestCase.layer.PloneSite in 12.654 seconds.
/home/tom/eggs/Products.CMFCore-2.2.7-py2.7.egg/Products/CMFCore/DirectoryView.py:493: UserWarning: DirectoryView classic_ecmascript refers to a non-existing path 'plonetheme.classic:skins/classic_ecmascript'
(self.id, reg_key), UserWarning)
Failure in test testDoUpgrades (plone.app.upgrade.tests.test_upgrade.TestUpgrade)
@tomgross
tomgross / gist:d059653bfe3948521d8f
Created August 6, 2014 13:35
Test failures of PortalTransforms with lxml cleaner
Failure in test testPolicy (Products.PortalTransforms.tests.test_engine.TestEngine)
Traceback (most recent call last):
File "/opt/Python273/lib/python2.7/unittest/case.py", line 327, in run
testMethod()
File "/home/tom/projects/buildout.coredev/src/Products.PortalTransforms/Products/PortalTransforms/tests/test_engine.py", line 206, in testPolicy
self.assertEqual(cache.getData(), '<p>this is safe</p>')
File "/opt/Python273/lib/python2.7/unittest/case.py", line 511, in assertEqual
assertion_func(first, second, msg=msg)
File "/opt/Python273/lib/python2.7/unittest/case.py", line 504, in _baseAssertEqual
raise self.failureException(msg)
@tomgross
tomgross / designer.html
Created September 11, 2014 07:57
designer
<link rel="import" href="../google-map/google-map.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
<link rel="import" href="../core-ajax/core-ajax.html">
<link rel="import" href="../speech-mic/speech-mic.html">
<link rel="import" href="../smoothie-chart/smoothie-chart.html">
<polymer-element name="my-element">
<template>
@tomgross
tomgross / buildout.cfg
Last active August 29, 2015 14:23
Plone WSGI deployment
[buildout]
parts = instance wsgiconf app
extends = http://dist.plone.org/release/5-latest/versions.cfg
[instance]
recipe = plone.recipe.zope2instance
user = admin:admin
http-address =
eggs =
Plone
@tomgross
tomgross / parse_token.sh
Last active August 25, 2016 08:02
Extract authenticator in Zope / Plone form
#!/bin/sh
curl -u admin:admin http://localhost:8080/Plone/portal_quickinstaller/manage_installProductsForm -q | grep -oP '_authenticator.*value="\K[a-z0-9]*' | head -1
@tomgross
tomgross / recreate.sh
Last active February 28, 2024 10:57
Recreating a messed up github pull request
# if some commits landed erroneous in a PR on github
# this commands help to start fresh from master
# replace `my_pr_branch` with the name of the branch of your pull request
git checkout my_pr_branch
git diff master > ../pr.patch
git checkout master
git branch -D my_pr_branch
# make sure it is the *SAME* name than the branch you deleted