Here is an update for the tools I’m using. The previous record was in 2013.
AppleScript to JavaScript
A small example how to rewrite make call from AppleScript to JavaScript.
tell application "Microsoft Outlook"
make new signature with properties {name: "Signature Name", content: "Best regards, ..."}
end tell
Application("Microsoft Outlook").Signature({name: "Signature Name", content: 'Best regards, ...'}).make();
Microsoft killed Wunderlist
Sadly, Microsoft is killing Wunderlist, more info in an official blog and on thenextweb.com. So it’s time to try something else, my requirements:
- should work on any device
- possibility to share lists with my family
- sub projects, minimum two levels
- possibility to review next and previous weeks
- possibility to review all tasks
- developer API
Some of these does not exists in Wunderlist, but covered by wunderweek.com, which I created at the end of 2016. The domain is paid till October, so it will continue to work till then. Also I added a view to show all tasks in one place, so they can be easily transfered to TaskPaper.
Migrations for MongoEngine
A MongoDB collection does not have a strict schema, the documents in one collection can have different fields. But in MongoEngine the schema is provided on an application level and there is a validation. So if you’ll remove a field from the Document and it’s still exists in the database, there will be a mongoengine.errors.FieldDoesNotExist exception. If there is no need in the schema validation, a dynamic schema can be used.
So when there is a strict schema, it’s good to have a tool to make an updates for the documents in the collection when something changes.
How to use multiple databases with Flask-MongoEngine
Sometimes it’s a good idea to use different databases for different parts of the application, they can have different requirements for performance and backup strategy or as a step to split a monolith to microservices.
Here is an example of configuration for Flask and MongoEngine.
Sublime Text freeze
Recently my Sublime Text has stopped running with freeze on start. I don’t know the cause, but removing of the last session helped.
cd "~/Library/Application Support/Sublime Text 3/Local"
rm *.sublime_session
How to build a dynamic query with mongoengine
An example of the use of the Q class to build the query.
Migration from http to https for hugo blog
This week I moved the blog from http to https. The reason - everything is moving to https and maybe it’s good for SEO. There were several steps.
Google App Engine limits and vendor locks
At the beginning of the 2015 I worked on a python application in Google App Engine. After all, because of some limitations and vendor locks, the app was moved to docker environment. Here is the list of these limitations. I did not check since then, maybe something changed, there is App Engine Flexible Environment, but it’s still in beta.
Celery background task with notifications through socket.io
If you have some long background tasks, sometimes it’s useful to notify a user about the progress. In this article i put an example for flask, celery and socket.io. In short form it’s described in flask-socketio documentation.