Skip to content

Instantly share code, notes, and snippets.

Patrick Gerken do3cc

  • Austria
Block or report user

Report or block do3cc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View lala.csv
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 5.
name,ring,quadrant,isNew,description
Babel,adopt,tools,TRUE,"This is the description. You can use basic html such as the <strong>strong tag to emphasise keywords and phrases</strong> and insert <a href=""https://www.thoughtworks.com"">anchor links to documentation and referance material</a>."
Consul,adopt,tools,FALSE,"This is the description. You can use basic html such as the <strong>strong tag to emphasise keywords and phrases</strong> and insert <a href=""https://www.thoughtworks.com"">anchor links to documentation and referance material</a>."
Grafana,adopt,tools,TRUE,"This is the description. You can use basic html such as the <strong>strong tag to emphasise keywords and phrases</strong> and insert <a href=""https://www.thoughtworks.com"">anchor links to documentation and referance material</a>."
Packer,adopt,tools,FALSE,"This is the description. You can use basic html such as the <strong>strong tag to emphasise keywords and phrases</strong> and insert <a href=""https://www.thoughtworks.com"">anchor links
View gist:19cf59ed8d232b57d0009c2b3a38ba6d
KeyError: '\x00\x00\x00\x01V\xe0\x11\x0c'
File "ZPublisher/Publish.py", line 138, in publish
request, bind=1)
File "ZPublisher/mapply.py", line 77, in mapply
if debug is not None: return debug(object,args,context)
File "ZPublisher/Publish.py", line 48, in call_object
result=apply(object,args) # Type s<cr> to step into published object.
File "OFS/ObjectManager.py", line 627, in manage_importObject
set_owner=set_owner)
File "OFS/ObjectManager.py", line 645, in _importObjectFromFile
View keybase.md

Keybase proof

I hereby claim:

  • I am do3cc on github.
  • I am do3cc (https://keybase.io/do3cc) on keybase.
  • I have a public key ASBOe0D2XMDS7LJSy9A1G-bCvRPK3wA3-Qxrs2KjYSmKhAo

To claim this, I am signing this object:

View gist:d413ee7bc3cacedb9e3da364bcd66b51
if request.META['HTTP_ACCEPT'].startswith('text/html'):
return HttpResponseRedirect(self.login_url)
else:
# You are not human after all and can handle 401 better
# https://www.youtube.com/watch?v=PXYeARRyDWk
return HTTPResponse(status_code=status.HTTP_401_UNAUTHORIZED)
@do3cc
do3cc / gist:4de070dfa15e945a21ea4e54c6247790
Last active Apr 14, 2016
How to run isort only for specific projects
View gist:4de070dfa15e945a21ea4e54c6247790
# ~/.vimrc
" Allow project specific vimrc files
set exrc
set secure " Prevent potentially malicious vimrc files from breaking stuff
" Isort
function! Isort()
let cursor_pos = getpos('.')
%!isort -
call setpos('.', cursor_pos)
@do3cc
do3cc / lala.py
Last active Nov 25, 2015
Hacky script to try to repair your database after problems with interfaces and the relation catalog
View lala.py
# It was hard to figure out, it might now be appropriate to use in your case.
# If you are not feeling comfortable to work on your database like this,
# don't run this gist.
from BTrees.OIBTree import OITreeSet
from ZODB.broken import Broken
from zc.relation.interfaces import ICatalog
from zope.component import getUtility
import transaction
View gist:4a8d2a043ee876ecbb92
<browser:page
for="*"
name="SecSigner.jar"
permission="zope2.View"
allowed_attributes="HEAD"
class=".applet.Applet1"
layer="blabla.signit.interfaces.IKboSignitLayer"
/>
class Applet(BrowserView):
View gist:520c9b0b03466f2bf469
#!/bin/bash
# Initialize a directory as a project
# This is script is meant as a companion for users who have a tool like
# checkoutmanager and work with virtualenvwrapper
# It also checks for starzel specific buildout conventions, but works for
# normal buildouts too
# This script is dangerous, it will delete the directory from which it gets
# executed and has no safeguard against it.
@do3cc
do3cc / keybase.md
Last active Aug 29, 2015
keybase.md
View keybase.md

-----BEGIN PGP MESSAGE----- Version: GnuPG v1

owF1kntQVFUcxxdIC6YSSCGQBG9jCax43w9kTBSE1BwjKgJqueeec5crsrvsA0ME RSWjUEHEEYQyaJxBHhaKCD7YQYYI0oApiKFleqKGQ2NI43OmexmaqJnOX+fx+X3P 93t+p+QpD52721BuSemdu492uvXdBLpE55ghFwNmmINF5mLSNgWZ7NrMJGYiLBLL QDlAtKEIxRxiMkMUsdUWMsvosWxktSlmk0rhEVwEheXpNVwrlhWTEVktVkXTwmQA GZoQJZIVRU4CJA1ljgC0RNKCQMgsLgoMwbI0oUqmm232f92KzWgaFKjuzvDrWTz6 H94xc4AIQWAgK0GZ4WiewYFE8TwhCwQnQZrDcQ20IetsJGimJEkzm4msGduQwWo2 zySW7Ip2TtAkIZCMQNCqHdGWrlZINJAEjqBknuQBLxJAEBEHKBxKnESKEEesBBBP

@do3cc
do3cc / gist:1179ebaa8de24247eb75
Created May 13, 2014
Repair CMFEditions quick and dirty
View gist:1179ebaa8de24247eb75
from Products.CMFEditions.ZVCStorageTool import Removed
zvc_repo = app.Plone2.portal_historiesstorage.zvc_repo
for shadow_history in app.Plone2.portal_historiesstorage._shadowStorage._storage.values():
for version in shadow_history._full.values():
if not 'referenced_data' in version:
continue
vc_info = version['vc_info']
zope_version = zvc_repo._histories[vc_info.history_id]._versions[vc_info.version_id]
if isinstance(Removed, zope_version._data._object):
del version['referenced_data']
You can’t perform that action at this time.