I hereby claim:
- I am cdw9 on github.
- I am cdw9 (https://keybase.io/cdw9) on keybase.
- I have a public key whose fingerprint is 20A2 09E8 62F8 6C09 0D7E E059 22F1 091D E583 C731
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| #!/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', |
| <?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" |
| <?xml version="1.0"?> | |
| <metadata> | |
| <version>002</version> | |
| </metadata> |
| <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"> |
| 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: |
| requests==2.21.0 | |
| six==1.12.0 | |
| slackeventsapi==2.1.0 | |
| slackclient==2.5.0 | |
| websocket-client==0.54.0 |
| 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 |
| <!-- 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 --> |
| # 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 |