Skip to content

Instantly share code, notes, and snippets.

### signal the start of configuration
- hosts: localhost
tasks:
- irc:
channel={{ irc_channel }} server={{ irc_server }} msg="Preparing to update the servers"
### configure each webserver
- hosts: webservers

Keybase proof

I hereby claim:

  • I am svx on github.
  • I am svx (https://keybase.io/svx) on keybase.
  • I have a public key whose fingerprint is 53F2 CC11 8D44 E709 63D6 9854 2BCE 315C 7C6B AE3F

To claim this, I am signing this object:

@svx
svx / sublime-rst-builder
Created November 6, 2014 13:27
sublime-builder for RST
About
=====
This is a custom sublime-builder for setting up restview [https://pypi.python.org/pypi/restview] as RST viewer.
Dependencies
------------
- restview
Install
@svx
svx / howto
Last active August 29, 2015 14:11 — forked from jensens/howto
1) use bootstrap.py from http://downloads.buildout.org/2/bootstrap.py
2) edit buildout.cfg and pin versions to:
[versions]
setuptools = 7.0
zc.buildout = 2.2.5
3) create a virtualenv as usal:
Basically, http://docs.plone.org/develop/addons/components/zcml.html#specify-files-and-code-from-another-package explains how to do it. But the example is not very clear, since in both cases the same packge is referenced. Therefore, a simple example:
Suppose you want to overwrite the folder_contents view in Plone. You only need to change some code in the class and you're happy with the template.
The view is defined in plone.app.content.browser with this zcml statement:
<browser:page
for="Products.CMFCore.interfaces._content.IFolderish"
class=".folder.FolderContentsView"
name="folder_contents"
@svx
svx / gist:0f0b88ac2da4aaa38098
Created July 14, 2015 09:19
PlonePAS MemberDataTool
from App.class_init import InitializeClass
from Acquisition import aq_base
from AccessControl import ClassSecurityInfo
from zope.interface import implements
from Products.BTreeFolder2.BTreeFolder2 import BTreeFolder2
from Products.CMFCore.permissions import ManagePortal
from Products.CMFCore.utils import getToolByName
from Products.CMFCore.MemberDataTool import MemberData as BaseMemberData
@svx
svx / gist:7ced29e3dded6fe893c9
Created July 14, 2015 09:22
PlonePAS MemberData class
from App.class_init import InitializeClass
from Acquisition import aq_base
from AccessControl import ClassSecurityInfo
from zope.interface import implements
from Products.BTreeFolder2.BTreeFolder2 import BTreeFolder2
from Products.CMFCore.permissions import ManagePortal
from Products.CMFCore.utils import getToolByName
from Products.CMFCore.MemberDataTool import MemberData as BaseMemberData
@svx
svx / buildout.cfg
Last active August 29, 2015 14:25 — forked from datakurre/README.rst
Plone 5.0b3 (depends on buildout-nix in nixpkages unstable)
[buildout]
extends = http://dist.plone.org/release/5.0b3-pending/versions.cfg
parts = plone5
versions = versions
[instance]
recipe = plone.recipe.zope2instance
eggs = Plone
user = admin:admin
var = /tmp
qa_update() {
docker pull quay.io/tiramisu/mr.docs
}
qa() {
if [ -d "docs/_build" ]; then
rm -rf docs/_build
fi
docker run -it --rm \
-v ${PWD}/docs:/build/docs:rw \
@svx
svx / readme
Created October 6, 2012 10:04
OpenVZ Gitlab template
This is a short readme on how to use the template. I'll create a detailed readme later, but for the moment I guess this should be fine.
Information
###########
Based on Debian 6.0.5 minimal AMD64
Gitlab 2.8 Stable
Additional packages: bash-completion, nano, fail2ban (preconfigured to block SSH hack attemps)