How I broke my archlinux and fixed it

Today, new lesson learnt. I needed to test something with Internet Explorer and Edge, so I’ve downloaded the test images from the Microsoft website, then proceeded to install virtualbox, in my current KDE based ArchLinux desktop (which I love a lot). A simple pacman -S virtualbox perhaps? Yes, except… After installing virtualbox, it complained about some missing libssl2.0.0 lib… so I thought maybe I don’t have that installed? I didn’t really research it, just installed openssl. [...]

Hello world with Plone and Riot (Javascript frontent library)

I’m working on a somewhat weird experiment. My end goal is to have a user friendly (and mobile friendly) faceted search interface over the items of a collection. Seen through the eyes of my recent experience with VueJS, the classic Plone frontend APIs, such as JQuery and Patternslib/Mockup seem outdated and hard to digest. Any dedicated frontend UI library will seem much friendlier. My self-imposed requirements were: easy to work with, easily integrated. [...]

When did tmux get plugins?

Well, this is new to me. Apparently tmux now supports plugins. I don’t really know if I need any plugin, I enjoy tmux as it is right now (after some customizations) but it’s good to know that plugins finally exist for tmux. So, what do we have: First, the Tmux Plugin Manager: Next, the tmux Facebook PathPicker plugin (which is a marvelous thing I didn’t knew existed): and https://github. [...]

Analyse and optimize a webpack vuejs bundle

At around 450 kb of javascript code, a Quasar distribution bundle seems a bit too big. The following short recipe applies to an app generated from the Quasar Framework default template, but it probably applies to any vuejs project that uses vue-loader, and even any project using webpack. First, we want to analyse what’s inside the bundle. A good utility is webpack-bundle-analyzer, but how to use it? Configure the webpack to write the stats to a json file. [...]

Loading packages without z3c.autoinclude in Plone 5.1

The new Plone 5.1 development buildout doesn’t include a zcml property in its [instance] section. It is no longer needed, with all eggs already providing a z3c.autoinclude entrypoint. This, unless you want to load an older package which doesn’t have such an entry point. That’s when the trouble starts. Adding a, for example: [instance] ... zcml += cs.auth.facebook doesn’t work. There is really no zcml property in any of the extended cfg file, so Zope will try to load this package first, which will result in a “permission not defined” zcml error. [...]

Using pyramid_jwt with pyramid_multiauth

pyramid_jwt has its own convenience method of registering as an authentication policy, through config.set_jwt_authentication_policy. It does so because the constructor of its policy takes a lot of arguments, so it’s best to trust the package to do its own setup. But this makes it a bit harder to use with pyramid_multiauth, as you can’t easily pass the JWTAuthenticationPolicy policy to the multiauth.policies setting. Turns out that is not hard at all. [...]

Installing node with NVM

This is more of a recipe for myself, as I always have problems with npm. I’m usually stuborn and refuse to use a globally installed nodejs, and can’t be really bothered to properly install a nodejs tarball distribution, with setting up PATH and all. They’re usually throw-away and not portable between my machines. So, a simple recipe to install nodejs on my own setup, an ArchLinux machine using fish as default shell. [...]

Test for an interface provided by object in plone action condition

Quick tip: how to test if the context provides an interface, with an expression set as the condition: python:object.restrictedTraverse("@@plone_interface_info").provides('') [...]

Plone: assign permission to role

I always forget, and a quick search through the eggs folder didn’t yield anything easy to find: how to I assign a permission to a role, in a context? This is a bit of code: from Products.DCWorkflow.utils import modifyRolesForPermission from AccessControl.PermissionMapping import getPermissionMapping perm = 'Delete objects' pm = set(getPermissionMapping(perm, context, st=tuple)) pm.add('Contributor') pm.add('Owner') modifyRolesForPermission(wc, perm, tuple(pm)) This is based on code found in DCWorkflow. I know, the proper code would be: [...]

Python packaging vs npm

I admit, Python packages are a bit more difficult to understand, for a newbie. I have witnessed this problem a lot, lately, when dealing with new people trying to learn the Python development process. There is a mountain of information that needs to be climbed, to understand Python packages: the namespace concept the matter of OS security the full cycle of an application, from development to deployment and maintainance And this are just basics, in addition to the distutils/setuptools/virtualenv/pip or zc. [...]