Blue Friday

Sept. 8, 2017, 4:39 p.m.

My new song, very loosely inspired by New Order's "Blue Monday." Written and produced by me, made with Ableton.

Labels: music

No comments

Python mysqlclient for Django on Windows

Sept. 6, 2017, 10:44 a.m.

I had been using SQLLite with Django for quite some time because I couldn't get mysqlclient for windows to install properly with pip. SQLLite was fine for local development, but before I deploy an app I wanted to get MySQL working.

It turns out it was very easy:

pip install mysqlclient==1.3.9

That's all I need to do! I had tried downloading wheels and all sorts of other stuff, none of which worked, but version 1.3.9 installs fine with no errors on Windows 10.

Labels: coding , python , django

No comments

PHP Imap

Sept. 6, 2017, 9:02 a.m.

If you get an error trying to connect with php_imap for Kerberos:

PHP Notice:  Unknown: Kerberos error: No credentials cache found (try running kinit) for (errflg=1) in Unknown on line 0

This is the solution:

Pass ['DISABLE_AUTHENTICATOR' => 'GSSAPI'] to imap_open for the last options parameter.

Labels: coding , php2

No comments

Update on Custom Logging

Aug. 9, 2017, 1:21 p.m.

After spending yesterday figuring out how to write custom log files, today I changed my mind and went a different route. The problem with these log files is that they would need to be parsed to generate the reports I would need to generate. While this could easily and efficiently be done with something like Python, in order to stick with using PHP I decided to take a completely different approach.

I created a statistics table where I can just increment the appropriate column rather than writing a whole line to a text file. My concern with this was that it would down the site substantially, so rather than recording the data while the user is performing the searches I created a Job and queue it to be processed later. This doesn't help with the server load, but it does remove the response time for the user as a factor.

Labels: coding , laravel

No comments