Categories
Uncategorized

install “legacy” brew on M1 apple silicon

I tried installing homebrew for about 3 days following the completely identical howto postings out there (i.e. “prefix with ‘arch -x86_64′”). Alas, it didn’t work: The other recommendation (run the whole terminal under Rosetta2, scroll down to “Running a special flavor […]”) also did not work. What did finally work though was changing my login shell […]

Categories
Uncategorized

Misc Django I – forms

Custom form errors If you want to validate something in the view, and return with a custom error message in the same form, you can use the “Form.add_error(fieldname, errorstring)” method. And then, of course, return to the previous template. class MyView(View): def get(self, request): data = form.cleaned_data if len(res) > 0: form.add_error( ‘login’, “Diese Personalnummer […]

Categories
Uncategorized

Firefox close tab buttons on mouse hover

I used to have Firefox’s TabMix Plus addon installed. And the feature I missed most – surprisingly – is to have the “close tab” buttons appear on a tab when you hover the mouse over it. Googling a little bit told me how to bring it back: Create a userChrome.css file ($FF_PROFILE_FOLDER/chrome/userChrome.css) Enter the code […]

Categories
Puppet

Quick puppet debugging snipper for Atom

Not sure how I could have lived without this until now (had it before in Sublime, never bothered porting, stooooopid as I realize now 😉 ): ‘.source.puppet’: ‘Puppet: fail inline template’: ‘prefix’: ‘fit’ ‘body’: “”” $fail_me = inline_template(‘<%= require “yaml”; YAML.dump(@$1) %>’) fail(“\\\\n\\\\nVariable \\\\$$1:\\\\n\${fail_me}\\\\n\\\\n”) “””

Categories
Infrastructure

Testing logstash configs with Docker

Now this is really not rocket science, but since I might do this more often, I don’t want to google every time. Prepare your directories ./tmp # THIS IS YOUR WORKING DIRECTORY |- patterns/ # optional | |- patternfile1 # optional | |- patternfile2 # optional |- logs.log |- logstash.conf Prepare your logstash config # […]