This file contains hidden or 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
| --change "Users:gm:Downloads: to "Users:Jan:Desktop" or similar | |
| --folder for files must be chosen one time (?) | |
| tell application "Finder" | |
| global thedate | |
| set thedate to (current date) as string | |
| global bndItems | |
| try | |
| activate |
This file contains hidden or 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
| #python 3 | |
| #bin/instance run set_alt_leadimage.py | |
| #cd /home/medialog/vol3/skipshistorie9996/zinstance/; sudo bin/instance run ../../set_resolve_images.py | |
| from zope.lifecycleevent import modified | |
| import plone.api | |
| from zope.component.hooks import setSite | |
| from plone.app.textfield import RichText | |
| from plone.app.textfield.value import RichTextValue | |
| from plone.rfc822.interfaces import IPrimaryFieldInfo |
This file contains hidden or 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/instance run find_macfiles.py -O skipshistorie | |
| import plone.api | |
| from zope.component.hooks import setSite | |
| setSite(app['skipshistorie']) | |
| for brain in app.skipshistorie.portal_catalog(id="ds_store"): | |
| obj= brain.getObject() | |
| print('deleting') |
This file contains hidden or 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
| #python 3 | |
| import pandas as pd | |
| #import openpyxl | |
| from zope.lifecycleevent import modified | |
| import plone.api | |
| from zope.component.hooks import setSite | |
| setSite(app['mysite']) |
This file contains hidden or 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
| <!-- wp:shortcode -->[pods field="field1"]<!-- /wp:shortcode --> |
This file contains hidden or 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
| Example 1: | |
| // Redirect to John Doe if mail body contains 'John Doe' | |
| add_filter('wp_mail', 'medialog_john_doe', 99); | |
| function medialog_john_doe($args) | |
| { | |
| if (str_contains($args['message'], 'John Doe')) { | |
| $args['to'] = 'john@doe.com'; | |
| return $args; | |
| } | |
| } |
This file contains hidden or 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
| for i in */; do zip -r "${i%/}.zip" "$i"; done | |
| #Dont need this, the zip commend does not include hidden files | |
| for i in */; do zip -d *.zip __MACOSX/\*zip -r "${i%/}.zip" "$i"; done |
This file contains hidden or 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
| ———————————————————————————————————————————————————————————————————————————————————————————————————— | |
| BBEdit / BBEdit-Lite / TextWrangler Regular Expression Guide Modified: 2018/08/10 01:19 | |
| ———————————————————————————————————————————————————————————————————————————————————————————————————— | |
| NOTES: | |
| The PCRE engine (Perl Compatible Regular Expressions) is what BBEdit and TextWrangler use. | |
| Items I'm unsure of are marked '# PCRE?'. The list while fairly comprehensive is not complete. |
This file contains hidden or 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
| ssh -L 61000:localhost:5901 -N -l navn servername.local | |