.

Python-Fu: Rename a file to match a caption

This script renames a directory full of XCF files so that the filename is derived from the first line of a layer named "caption".

This is a kind of SEO trick, to name images with descriptive file names. I wrote this to enhance the file names for Koya Hand Crafts.

Email Cloaking Script (Email Hiding)

Originally from: 2007-09-26 15:17:44 -0700

Here's a perl script that takes email addresses as arguments, and returns javascript code that hides your email address from web spiders. The email address is also linked so it's clickable.

CSS Font and Style Switcher (jQuery)

This is a bit of code to add a floating box to your page that will let you switch stylesheets and fonts. I wrote it specifically to start trying out different "themes" and fonts, not to allow the end user to do these things. But the client will be using it to preview.

It's not fully parameterized, nor does it generate the HTML for the selects, so you'll need to hack the code.

Contemporary PHP Coding

Some of the notes here are really old, and use old practices. This is a rundown of contemporary practices circa 2016. I'm a few years behind, so, it's more like 2013 practices, but, there are still tutorials being written that don't use these better techniques. Get with the times.

Don't set up Apache. Instead use "php -S localhost:8000" to start a local server from the shell. The docroot will be in the current directory, and error logs go to the screen.

Python-Fu: Save different versions of an XCF file (branded, watermarked, thumbnail)

It took forever, but I finally hunkered down and learned some Python-Fu. It's really nice, especially being able to use Python's libraries, but, like programming Gimp in Scheme, it was kind of hard.

The most important thing, which I learned only after working at it three hours, is to use the "Browser..." tool in the Python console (in Gimp). This helps you find predefined commands to do all the expected operations. Use the "Apply" button to paste an example into the console.

GoDaddy InstantPage Gone :(

I'm kind of bummed out. GoDaddy's free web page builder, InstantPage, isn't being given out with the domain anymore. I thought it was going to kill the website building business (meaning something I do for money) but the prospect of a nice page done in an hour or less, hosted for free, was just too awesome.

Maybe the free product was cannibalizing sales of their other products.

Vagrant with WordPress, Provisioned by Ansible

This is a small project that helps you set up a development environment for WordPress, and it's done with Vagrant and Ansible.

https://github.com/johnkawakami/vagrant-ansible-wp

It's based on http://www.hongkiat.com/blog/install-wordpress-locally-vagrant/.

Review: MX Guarddog

I stumbled across this site, and decided to give it a try. Yeah, I don't know if it's even a legit service, but I decided to route ALL my mail through them.

Their price is 25c per email address per month, which is cheap if you have just one address. I, unfortunately, use four. If I decide to use MX Guarddog permanently, a couple of these will be going away because I'm that cheap.

You can get around this fee by putting a link to their service on your site. These are text links that you embed in your pages.

Adventures in Screenshotting

I'm having one of those mornings, where nothing works quite right.

Yet Another Markdown Include Preprocessor

I'm doing some writing in Pandoc, and the Markdown implementation doesn't have an "include" feature to pull in source code. After looking around, there are some tools that implement #include or !include, but there weren't quite what I wanted, so I wrote this in awk.

ERROR 1698 (28000): Access denied for user 'root'@'localhost'

ERROR 1698 (28000): Access denied for user 'root'@'localhost' started showing up with the system upgrade to Ubuntu 15 and MariaDB.

Fixes are described at

http://superuser.com/questions/957708/mysql-mariadb-error-1698-28000-access-denied-for-user-rootlocalhost/963968

http://superuser.com/questions/949496/cant-reset-mysql-mariadb-root-password

However, there's a way to preserve the additiona

Writing Articles in HTML5

I've been writing HTML forever, but really never looked at the new HTML5 tags. For the most part, I'd devolved into using DIV and SPAN and FORM and a few other tags to code up webpages. That's OK for writing software, but it was getting pretty stupid when I was putting in code like DIV CLASS="address". A quick trip through the HTML5 tags revealed a cornucopia of tags relevant to writing academic papers and computer programming tutorials.

Using LibreOffice to Load Excel Data into an SQL Database

We wanted to know how Bernie Sanders did in several electoral districts.

What are our data sources.

There are two public databases that can help us discover these vote totals. One is the election results broken down by voting precinct. The other is a database that maps the precinct numbers to district numbers.

lavote.net's precinct reports

The Los Angeles County Registrar Recorder publshes vote tallies aggregated by precinct. The problem is, these are reports, not raw or cooked data.

failed with not authorized on admin to execute command { replSetHeartbeat

I got the above error while trying to build a replica set in MongoDB.

If you have security:

security:
  authorization: enabled

Then you need to set up Internal Authentication. This is a kind of password that nodes will use to authenticate that they are part of a network, and can access each other.

Here's the document that explains setting up Internal Authentication.

Looking at Kindle Unlimited (part of Amazon Prime)

I started looking into Kindle Unlimited (KU), a $10 a month borrowing library for Kindle e-books, for tutorials on some subjects I'm studying, and also as a possible publishing platform for articles. What I found is a market that, for readers, is somewhat non-functional.

I looked at 21 books. (Really, it's a little more, but I wasn't paying attention early on.) Of these, I found 7 writer worth reading, and 13 writers to avoid.

Syndicate content