Skip to content

Instantly share code, notes, and snippets.

View macagua's full-sized avatar
🏠
Working from home

Leonardo J. Caballero G. macagua

🏠
Working from home
View GitHub Profile
@macagua
macagua / buildout.cfg
Last active August 29, 2015 14:11
Quality Assurance Plone buildout configuration
[buildout]
extends =
https://raw.github.com/collective/buildout.plonetest/master/qa.cfg
[code-analysis]
directory = ${buildout:directory}/src/
pre-commit-hook = True
flake8-ignore = E501
clean-lines = True
deprecated-aliases = True
@macagua
macagua / buildout.cfg
Last active August 29, 2015 14:11
Event Log, Verbose and Debug mode for Plone buildout configuration
[buildout]
extends = http://dist.plone.org/release/4.3-latest/versions.cfg
find-links =
http://dist.plone.org/release/4.3-latest/
http://dist.plone.org/thirdparty/
show-picked-versions = true
eggs =
unzip = true
versions = versions
@macagua
macagua / buildout.cfg
Last active August 29, 2015 14:11
SVN Pre commit Hook for Quality Assurance Plone buildout configuration
[buildout]
extensions =
# A zc.buildout extension to ease the development of large projects with lots of packages.
# For options see http://pypi.python.org/pypi/mr.developer
mr.developer
extends =
https://raw.github.com/collective/buildout.plonetest/master/qa.cfg
http://dist.plone.org/release/4.3-latest/versions.cfg
@macagua
macagua / rsync-backup.sh
Created August 26, 2014 14:33
A rsync backup script
#!/bin/bash
# Source URL: http://www.plone-entwicklerhandbuch.de/plone-entwicklerhandbuch/produktivserver/backup-der-zodb/rsync-backup.sh/view
# SOURCES and TARGET must end with slash
SOURCES="/home/plone/plone41_buildout/backups/backup_*"
SOURCES="${SOURCES} /home/plone/plone41_buildout/var/blobbackup*/*.0/"
TARGET="/backups/plone/plone41_buildout/"
MOUNTPOINT="/backups/"
LOGFILE="/home/plone/plone41_buildout/var/log/backup_plone41.log"
@macagua
macagua / fixblobs.py
Created August 25, 2014 23:09
A Zope command line script to delete content with missing BLOB in Plone
"""
A Zope command line script to delete content with missing BLOB in Plone, causing
POSKeyErrors when content is being accessed or during portal_catalog rebuild.
Tested on Plone 4.1 + Dexterity 1.1.
http://stackoverflow.com/questions/8655675/cleaning-up-poskeyerror-no-blob-file-content-from-plone-site
Also see:
@macagua
macagua / GourceGravatarExample.py
Created June 20, 2014 04:20
Python Gravatar Example for Gource software
# -*- coding: utf-8 -*-
#fetch Gravatars
# https://code.google.com/p/gource/wiki/GravatarExample
import os
import requests
import subprocess
import hashlib
@macagua
macagua / correo.html
Created March 19, 2014 02:46
Email Anti-spam with HTML and CSS styles
<style type="text/css">
span.test { direction: rtl; unicode-bidi:bidi-override; }
</style>
<p><span>[email protected]</span></p>
<p><span class="test">moc.liamg@orellabacodranoel</span></p>
@macagua
macagua / dc.ldif
Last active August 29, 2015 13:56
This a example file for OpenGEVER LDAP Demo
# Root of directory tree "dc=4teamwork,dc=ch"
dn: dc=ch
objectClass: domain
objectClass: top
dc: ch
dn: dc=4teamwork,dc=ch
objectClass: domain
objectClass: top
dc: 4teamwork
@macagua
macagua / gist:5072640
Created March 2, 2013 19:10
This recipe helps to copy backup Plone data from one place to another via rsync with a crontab job. For options see http://pypi.python.org/pypi/z3c.recipe.usercrontab
# This recipe helps to copy backup data from one place to another via rsync with a crontab job.
# For options see http://pypi.python.org/pypi/z3c.recipe.usercrontab
[move-zodb-back]
recipe = z3c.recipe.usercrontab
times = 0 3 * * 7
keep = 0
gzip = true
command = rsync -av ${buildout:directory}/var/backups/filestorage/Data.fs* user@DNS_SERVER:/path/to/backups/directory/
@macagua
macagua / webalizer_lang.spanish
Created February 27, 2013 14:36
It is the Language Support file for Spanish (webalizer_lang.spanish) with full Spanih translation for webalizer software (http://www.webalizer.org/)
/*
webalizer_lang.spanish
Webalizer V2.0x Language Support file for Spanish.
27-Feb-2013 Translated by Leonardo J. Caballero G. ([email protected])
29-May-1998 Translated by Alfredo Sola ([email protected])
31-May-1998 Modified for level 1.1 support ([email protected])
23-Jul-1998 Modified for level 1.2 support ([email protected])
29-Jul-1998 Translation for most countries and 1.2 new strings
by ([email protected])