Convert Docx to Markdown

I needed to convert a Docx file to Markdown, but Pandoc kept giving me this obnoxious error: $ pandoc test.docx -o test.md pandoc: Cannot decode byte ‘\xae’: Data.Text.Encoding.Fusion.streamUtf8: Invalid UTF-8 stream However, you can use the tool unoconv to make an intermediary step to convert first to HTML and then to Markdown. $ unoconv –stdout…

Continue reading

Duplicate a Django modelformset_factory Form

I created a formset_factory and wanted to have a simple “click me to add another form”. This seemed like a routine task, but the solutions I found online were unnecessarily complicated or required me to install a separate Django app, which I had no intention of doing. So I created my own… The only pre-requirement that…

Continue reading

IPv6 Firewall Rules

I setup a Hurricane Electric tunnel to get my house on IPv6 (Verizon fails to deliver!) and was given a /64 allocation. I then setup a Router Advertisement daemon to get every computer online. Yippee! But, there’s a problem…now every computer in my house is exposed to the wrath of the Internet. While the Network…

Continue reading

Custom Django Fixture Imports

I needed to convert an XML document into a customize Django model with modifications to the based on programmable logic. Converting it to my model’s fixture would take too long and be unnecessary work, so I instead opted to manually convert the data. I figured I could just import the Django model object, as is…

Continue reading