Author Archives: admin

How to reset lost QNAP iscsi CHAP password

I wanted to change the password for one of my QNAP ISCSI luns, but there really is no way to do that with the current software. Fortunately you can recover your password by using ssh to login to your qnap, … Continue reading

Posted in QNAP | Comments Off on How to reset lost QNAP iscsi CHAP password

ImportError: cannot import name sanitizer when trying to run django

I hope this saves you a couple hours of headaches that I experienced recently. If you get the dreaded error: from html5lib import sanitizer, serializer, treebuilders, treewalkers ImportError: cannot import name sanitizer Never fear. The fix is easy once you … Continue reading

Posted in django, python, Web Programming | Comments Off on ImportError: cannot import name sanitizer when trying to run django

KeyError: ‘en-us’ when doing a reverse() lookup in urls.py

If you’re getting an error like this: … in reverse_dict return self._reverse_dict[language_code] KeyError: ‘en-us’ If your urls.py file contains a reverse() call, that is the reason.  You’re calling reverse before all the urls are loaded and everything is ready.  You … Continue reading

Posted in django, python, Web Programming | Comments Off on KeyError: ‘en-us’ when doing a reverse() lookup in urls.py

How to get rid of winmail.dat attachments when using Office365 and Outlook 2016

Sometimes Outlook 2016 decides to send the body every email as a winmail.dat attachment. This works fine when the person you are sending the email to is using Outlook. But other mail users will get a blank message with a … Continue reading

Posted in Exchange, Office 365 | Comments Off on How to get rid of winmail.dat attachments when using Office365 and Outlook 2016

How to fix all postgres sequence numbers in a database

Create this stored procedure: CREATE OR REPLACE FUNCTION “reset_sequence” (tablename text, columnname text, sequence_name text) RETURNS “pg_catalog”.”void” AS $body$ DECLARE BEGIN EXECUTE ‘SELECT setval( ”’ || sequence_name || ”’, ‘ || ‘(SELECT MAX(‘ || columnname || ‘) FROM ‘ || … Continue reading

Posted in Uncategorized | Comments Off on How to fix all postgres sequence numbers in a database