Dubugging Flask applications under uWSGI
Before the if __name__ == '__main__':
part of your application, i.e. at the very end, you have to wrap a werkzeug.debug.DebuggedApplication
middleware around your app
object.
Before the if __name__ == '__main__':
part of your application, i.e. at the very end, you have to wrap a werkzeug.debug.DebuggedApplication
middleware around your app
object.
Monitor Directory for Changes Here’s a simple script that I setup for my development WSGI server to reload itself once changes in source code are detected: #!/bin/bash while true; do A=`find $1 -printf ‘%t’ | md5sum`; sleep 1 B=`find $1 -printf ‘%t’ | md5sum`; if [ «$A» != «$B» ]; then echo «Detected change, doing: $2» …
tail -f | event Monitoring log files for specific keywords and firing off an event turns out to be quite simple to accomplish in bash with a `while` loop. #!/bin/bash tail -f $1 | while read line; do line=`echo -n «$line» | grep -i «$2″` if [ -n «$line» ]; then # mate-notify-send -t 0 «$2 …
keytool -genkeypair -alias androiddebugkey -dname 'CN=Android Debug,O=Android,C=US' -keystore /tmp/debug.keystore -keyalg RSA -validity 10000
generate a valid Android debug keypair (Signing in Debug Mode) with password ‘android’ for both the keystore and the keys
So I was looking for a VPS provider with Arch images. Amazon AWS is quite expensive, although Arch Linux AMI images are available from Uplink Labs. But besides that, I’ve also been looking to switch to XEN virtualization, to have guaranteed memory, the power of swap and other advantages over OpenVZ and Virtuozzo offered by many companies.
I have written yet another Gravity Forms plugin/addon. This time the plugin was to generate bulk reports for form entries, digests of sorts. Based on a set schedule (which can be altered using the cron_schedules
filter), this addon will aggregate all new form entries it hasn’t seen yet (including very old ones) and send them out to predefined e-mail addresses.
Sometimes complex shipping and handling rules make it impossible for customers to place orders in PrestaShop. Lack of instant shipping quotes, huge quantities and large weights, limited shipping addresses, etc. And while PrestaShop administrators are able to create orders manually via the back-end, these manual orders are still subject to the same shipping carrier rules.
Participants might not be able to setup their own development environments in light of many possible reasons and limitations. So remote development environments are usually setup for such participants so that they can work on their own forks of a project without interfering with others’ work. S/FTP/S is usually used, due to their inability to use version control remotely.
Flask-Admin is a pretty powerful administration solution, which, however lacks several important features for managing models with many-to-many relationships (or at least clear documentation thereof). Here are some useful (albeit perhaps unreliable) hacks to get Flask-Admin SQLAlchemy models to dance the dance.
My talk was on testing automation in custom WordPress code, which covered some basics of unit tests using PHPUnit, system tests using CasperJS.
I like minimal, self-contained solutions. One excellent tool is, of course, rsync
, which offers incremental file transfers, which is pretty neat, and saves space by only saving changed files from last checkpoint. This type of backup is usually referred to as incremental backsup. For your media collection or user file uploads this is great. But space can be saved even more if most of the changes are inside the files. This is where differential backup comes in. rsync
doesn’t do differential backups. Moreover, there seems to be no straightforward access to history, diffs, etc.
The main WordPress for Android repository is over at GitHub. But as it turns out…