Functions Deprecated in WordPress 3.4
Functions Deprecated in WordPress 3.4 Here’s a list of functions that are now deprecated in WordPress 3.4: debug_fopen, debug_fwrite, debug_fclose, substituted by PHP’s native error_log get_themes, substituted for wp_get_themes, whereas get_theme and get_current_theme functions are replaced by wp_get_theme clean_pre is not replaced by anything, its relevant use inside the core has been replaced with good code, …
Extra Data in jQuery AJAX Requests
Extra Data in jQuery AJAX Requests Sometimes it’s necessary to bind some additional data to an AJAX request, data that is not sent over the wire but has to pop up in the callback. For instance: var dataStreams = ; dataStreams.push( { ‘id’: ‘A04AC’, ‘data’: ‘Hello World’ } ); dataStreams.push( { ‘id’: ‘AVM32’, ‘data’: ‘Easy does …
Don’t Post Images of Your Credit Card Online
And some people actually think there’s nothing bad in posting parts of the card. Yet, the same people have no understanding of which parts are safe to display and which are not. General rule – don’t show your credit card at all, especially online for the general public to view. I have wiped out the critical information in my version of the image as to stop the propagation of this nonsense. The cardholder pasted the image in the clear. Size is taken from the original.
Setting up Flask with nginx
In any case, since my webserver of choice has long been nginx (built-in servers don’t impress me too much), having it serve Flask applications in a robust, reliable way was required. The instructions to marry nginx and Flask via uWSGI are quite clear. I compiled the uwsgi application container, read the docs and came up with the following startup command:
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.
Monitor Directory for Changes
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
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 …
Resigning Tampered Android APKs
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
A new, much better home for my code
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.