Skip to content

Instantly share code, notes, and snippets.

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
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

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:

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 April 14, 2016 14:46
How to run isort only for specific projects
# ~/.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 November 25, 2015 13:56
Hacky script to try to repair your database after problems with interfaces and the relation catalog
# 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
<browser:page
for="*"
name="SecSigner.jar"
permission="zope2.View"
allowed_attributes="HEAD"
class=".applet.Applet1"
layer="blabla.signit.interfaces.IKboSignitLayer"
/>
class Applet(BrowserView):
@do3cc
do3cc / gist:520c9b0b03466f2bf469
Created April 8, 2015 21:10
virtualenvwrapper init
#!/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 August 29, 2015 14:09
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 14:12
Repair CMFEditions quick and dirty
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']