This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<subscriber | |
for="plone.dexterity.interfaces.IDexterityContent | |
zope.lifecycleevent.interfaces.IObjectModifiedEvent" | |
handler=".events.modifiedMosaic" | |
/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# bin/instance1 -O plonesiteid run scripts/portlet_assignments.py | |
import logging | |
import sys | |
from AccessControl.SecurityManagement import newSecurityManager | |
from plone import api | |
from plone.portlets.interfaces import IPortletAssignmentMapping, IPortletManager | |
from zope.component import queryMultiAdapter, queryUtility |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- custom template --> | |
<browser:page | |
name="ofs_file_view" | |
class=".ofs.OFSFileView" | |
template="ofs_file_view.pt" | |
permission="zope2.View" | |
for="plone.app.contenttypes.interfaces.IFile" | |
/> | |
<!-- custom @@download for the type --> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Install terminal-notifier: https://github.com/julienXX/terminal-notifier | |
2. Create a virtualenv | |
3. pip install arrow | |
4. test code with `env/bin/python daily-notify.py` | |
5. Set up the cronjob | |
6. If you want the notifications to be sticky, go to System Preferences > Notifications, and make sure terminal-notifier notifications display as Alerts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
requests==2.21.0 | |
six==1.12.0 | |
slackeventsapi==2.1.0 | |
slackclient==2.5.0 | |
websocket-client==0.54.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def event_dates(date, time): | |
"""Takes the event's date and time fields, | |
returns a start date and end date (if applicable) | |
example date: "2017/09/16 00:00:00 GMT-4" | |
example time: "11:00 am" or "9:00am - 11:00pm" | |
""" | |
if not date: | |
return [None, None] | |
date = date.replace('GMT-4', 'America/New_York') | |
if not time: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="documentDescription description" | |
tal:define="html_descrip context/html_description | nothing; | |
plain_descrip context/Description" | |
tal:condition="plain_descrip"> | |
<tal:html tal:condition="html_descrip" | |
tal:content="structure html_descrip"> | |
Description | |
</tal:html> | |
<tal:plain tal:condition="not: html_descrip" | |
tal:content="plain_descrip"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<metadata> | |
<version>002</version> | |
</metadata> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0"?> | |
<object | |
i18n:domain="plone" | |
meta_type="Dexterity FTI" | |
name="Folder" | |
xmlns:i18n="http://xml.zope.org/namespaces/i18n"> | |
<action | |
action_id="download_files" | |
category="object" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/Users/chrissy/projects/nd/nd-buildout/env/bin/python2.7 | |
import sys | |
sys.path[0:0] = [ | |
'/Users/chrissy/.buildout/eggs/Pillow-3.2.0-py2.7-macosx-10.11-x86_64.egg', | |
'/Users/chrissy/.buildout/eggs/collective.indexing-1.8-py2.7.egg', | |
'/Users/chrissy/.buildout/eggs/collective.upgrade-1.1-py2.7.egg', | |
'/Users/chrissy/.buildout/eggs/plone.app.dexterity-2.0.18-py2.7.egg', | |
'/Users/chrissy/.buildout/eggs/plone4.csrffixes-1.0.9-py2.7.egg', | |
'/Users/chrissy/.buildout/eggs/Products.PloneHotfix20160830-1.3-py2.7.egg', |
NewerOlder