-
System
- htop - Processes
- atop - System monitor
-
Disk I/O
- iotop
-
Network
This file contains 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
""" Custom Add/Edit forms | |
""" | |
from zope import schema | |
from zope.component import queryAdapter | |
from zope.component import provideAdapter | |
from z3c.form.browser.checkbox import CheckBoxFieldWidget | |
from z3c.form.browser.radio import RadioFieldWidget | |
from plone.dexterity.browser import edit | |
from plone.dexterity.browser import add | |
from eea.facetednavigation.interfaces import ICriteria |
This file contains 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
# Fix broken zc.async within Data.fs | |
$ bin/instance debug | |
>>> del app._p_jar.root._root['zc.async'] | |
>>> import transaction | |
>>> transaction.commit() |
This file contains 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
# Install uwsgi>=2.0.15 (requires build-essential and python-dev) | |
# adding it to eggs should also work, assuming you have gcc | |
[buildout] | |
parts += | |
instance | |
uwsgi-app | |
uwsgi-run | |
[uwsgi-run] |
This file contains 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
# Installation: | |
# | |
# $ mkdir ~/.vim/backups | |
# $ curl -fLo ~/.vim/autoload/plug.vim --create-dirs https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
# $ curl -o ~/.vimrc https://gist.githubusercontent.com/avoinea/3b7a79cb50d86af125454a1c669ec702/raw/e6469bfc7c246cfdf1060abd64c13c871c6ba46a/.vimrc | |
# $ vim | |
# :PlugInstall | |
# :q | |
# | |
# Enjoy ;) |
This file contains 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
from zope import interface | |
from zope import component | |
################################################################################ | |
# Geek Model | |
################################################################################ | |
class IGeek(interface.Interface): |
This file contains 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
# - Archiving - | |
archive_mode = on # allows archiving to be done | |
# (change requires restart) | |
#archive_command = 'test ! -f /var/lib/pgsql/backup_in_progress || (test ! -f /var/lib/pgsql/archive/%f && cp %p /var/lib/pgsql/archive/%f)' # command to use to archive a logfile segment | |
archive_command = 'rsync -a %p [email protected]:/var/lib/pgsql/archive/%f' | |
# placeholders: %p = path of file to archive | |
# %f = file name only | |
# e.g. 'test ! -f /mnt/server/archivedir/%f && cp %p /mnt/server/archivedir/%f' | |
archive_timeout = 600 # Let's keep us max 10minutes away from the master |
This file contains 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
# Remove all non-data docker containers | |
docker rm -v $(docker ps -a | grep -v "data" | gawk '{print $1}';) | |
# Remove <none> docker images | |
docker rmi $(docker images | grep none | gawk '{print $3}';) |
This file contains 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
<configure package="eea.facetednavigation.browser"> | |
<browser:page | |
for="eea.facetednavigation.interfaces.IFacetedNavigable" | |
layer="enisa.databreach.content.interfaces.IDatabreachContentInstalled" | |
name="faceted_query" | |
class="enisa.databreach.content.browser.faceted.CustomQueryHandler" | |
template="template/query.pt" | |
permission="zope2.View" | |
/> | |
</configure> |
NewerOlder