Posting this handy Gimp plugin here, just in case it drops off the Internet. It was licensed under CC0 by the original author.
Download ez-perspective.py here.
Installation: copy the Python script into your plugins folder (location can be found under Preferences > Folders > Plugins) and restart Gimp. There should now be a new menu item under Filters > Distort.
Description, taken from the file:
A Gimp plug-in to easily change the perspective in an image, just like it says on the tin.
Particularly useful for correcting photographs, but can also be used to add a Dutch angle to any image.
Provides 3 parameters to change up/down (tilt, pitch), left/right (swing, yaw), and rotation (twist, roll).
after correcting lens distortion (barrel distortion, vignetting, lateral chromatic aberration), as these depend on the lens, on the shot as taken
before cropping, as this changes the shape of the image, and will likely warrant cropping afterwards
Just spent too much time on finding out why sessions didn’t work on a particular site. To be precise: the PHP session cookie was not sent.
Turned out that there was a line in the site’s .htaccess that also set a temporary cookie:
<FilesMatch "\.php$"> Header set Set-Cookie "myCookie=1; path=/;" </FilesMatch>
All was fine when I changed
<FilesMatch "\.php$"> Header add Set-Cookie "myCookie=1; path=/;" </FilesMatch>
I read this (“Using Twitter From the Command Line Is Actually Really Fun“) and I wanted it too. Not in an ordinary Linux box but in the Ubuntu bash on Windows 10. Turned out that I needed to add a graphical browser to be able to log into Twitter and authenticate the Rainbow Stream app.
It isn’t hard to do, but I thought I’d write it down anyway.
Assuming that bash is already installed, run these commands. There will be lots of notices and messages…
sudo apt-get install python3-pip(skip this if you already have pip; it is only required for the third step)
sudo apt-get install libsqlite3-dev libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev
sudo pip3 install rainbowstream
sudo apt-get install firefox(or any other web browser)
- in Windows, install an X server. I followed this article and installed the Xming X Server for Windows.
- back in bash:
firefox &(should open FF in an X window)
Hit enter to return to the prompt.
rainbowstream and authenticate the app in the browser. Enter the pin Twitter returns into rainbowstream and it should be up and running.
Writing this down as I usually forget how to localize text in
Left hand column, select Resources folder
Right click > New file… > Resource, Strings File
Save file as
Open the file in the editor, enter strings to localize, like
NSLocationWhenInUseUsageDescription = “Show your location on the map”;
In right hand column, click Localize button (makes the file localizable)
Now go to the project’s Localizations settings (under Project > Info)
Click Add language and select InfoPlist.strings
In the left hand column, there now are two entries under InfoPlist.strings. Edit as you please.
Works in Xcode 7 and 8.
A script that handled a php://input stream exited rather unexpectedly when it called
session_start(). I had ‘track_errors’ enabled, so there was a message in
$php_errormsg saying that headers had already been sent. But there was no file name or line number.
As my production web server now runs on Apache 2.4 and PHP 5.6, an upgrade on the dev machine seemed appropriate. Also, Zend recently launched Studio 13, with support for PHP 5.6 and even PHP 7. I decided to upgrade everything at once.
Just spent too much time figuring out how to add a language to a keyboard, in order to get spell checking and auto type suggestions in the right language.
On my server, I have a PHP script that runs once a day to post a message and a picture to a Facebook page that I administer. Yesterday Facebook upgraded their API to v2, breaking my script that had been running fine since a few years.
Wasted some time figuring out how to create folders within mail folders.
Client: Thunderbird, server: Dovecot, mailbox format: Mbox.