Skip to content

Instantly share code, notes, and snippets.

View fulv's full-sized avatar
🇮🇹

Fulvio Casali fulv

🇮🇹
  • Soliton Consulting
  • San Diego, CA, USA
View GitHub Profile
@fulv
fulv / ecriture-des-documents-modele-libreoffice.md
Last active November 25, 2017 17:51
Writing LibreOffice templates

Principles

The office document template is a LibreOffice document written normally, except for the significant fact ;-) that it will contain computer code, allowing to display data from the context, to have conditions, to run loops, to incorporate sub-templates, etc.

When generating the document in a given context, the computer code present in the template is "interpreted" and replaced by data to produce the final document.

The computer syntax used is that of the appy framework library, whose "pod" module manages the generation of the document. The "gen" module of that library is not used.

It is possible to insert the computer code in several ways, all explained below. The presence of this computer code does not prevent formatting.

@fulv
fulv / keybase.md
Created November 1, 2017 09:52
keybase.md

Keybase proof

I hereby claim:

  • I am fulv on github.
  • I am fulv (https://keybase.io/fulv) on keybase.
  • I have a public key ASDg2gQIZPcepu34-km30wPcU1hZM4V0_eZAQTlrNkDDVAo

To claim this, I am signing this object:

@fulv
fulv / main.yml
Last active August 31, 2023 09:06
Ansible - Creating users and copying ssh keypair files to the remote server
Put this in your `local-configure.yml` file, add as many users as you need:
users:
- name: fulvio
sudoer: yes
auth_key: ssh-rsa blahblahblahsomekey this is actually the public key in cleartext
- name: plone_buildout
group: plone_group
sudoer: no
auth_key: ssh-rsa blahblahblah ansible-generated on default
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by FULL-PACKAGE-NAME preflight VERSION, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ ./preflight -q
## --------- ##
## Platform. ##
@fulv
fulv / case-insensitive.py
Created November 18, 2015 23:59
herding cats
from Products.Archetypes.annotations import AT_ANN_STORAGE
from Products.Archetypes.annotations import AT_FIELD_MD
from Products.Archetypes.annotations import AT_MD_STORAGE
from Products.Archetypes.annotations import AT_REF
from Products.Archetypes.annotations import getAnnotation
from Products.Archetypes.ArchetypeTool import listTypes
from Products.Archetypes.ArchetypeTool import process_types
from Products.Archetypes.ArchetypeTool import registerClasses
from Products.Archetypes.ArchetypeTool import registerType
[theme]
title = plonetheme.tango
description = An example diazo theme
rules = /++theme++plonetheme.tango/rules.xml
prefix = /++theme++plonetheme.tango
doctype = <!DOCTYPE html>
enabled-bundles =
disabled-bundles =
development-css = /++theme++plonetheme.tango/css/main.less
@fulv
fulv / gist:0dbbf9395d2d8e9d02f6
Last active October 10, 2015 15:23
ploneconf.site setuphandlers
2015-10-10 15:14:28 ERROR Zope.SiteErrorLog 1444490068.950.870257499864 http://localhost:8080/Plone/portal_quickinstaller/reinstallProducts
Traceback (innermost last):
Module ZPublisher.Publish, line 138, in publish
Module ZPublisher.mapply, line 77, in mapply
Module Products.PDBDebugMode.runcall, line 70, in pdb_runcall
Module ZPublisher.Publish, line 48, in call_object
Module <string>, line 6, in reinstallProducts
Module AccessControl.requestmethod, line 70, in _curried
Module Products.CMFQuickInstallerTool.QuickInstallerTool, line 786, in reinstallProducts
Module Products.CMFQuickInstallerTool.QuickInstallerTool, line 686, in installProducts
// page init
jQuery(function(){
initCustomForms();
initTouchNav();
initCarousel();
initOpenClose();
initAccordion();
initMobileNav();
initBackgroundResize();
initSameHeight();
diff --git a/plonesocial/network/Extensions/Install.py b/plonesocial/network/Extensions/Install.py
new file mode 100644
index 0000000..af15c80
--- /dev/null
+++ b/plonesocial/network/Extensions/Install.py
@@ -0,0 +1,7 @@
+from Products.CMFCore.utils import getToolByName
+
+
+def uninstall(self, reinstall=False):
@fulv
fulv / gist:03a43c4989c7e413cf94
Created November 5, 2014 15:31
configure.zcml
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:five="http://namespaces.zope.org/five"
xmlns:i18n="http://namespaces.zope.org/i18n"
xmlns:genericsetup="http://namespaces.zope.org/genericsetup"
xmlns:cmf="http://namespaces.zope.org/cmf"
i18n_domain="plonesocial.network">
<five:registerPackage package="." initialize=".initialize" />
<i18n:registerTranslations directory="locales" />