Rdiff-backup is a great backup program. It is very easy to install it on a Synology NAS box like the Synology DS218+ Diskstation. You need just a couple of things: ssh access enabled on your Diskstation an internet connection Do the following Log into the Synology web UI. Use the Package Center to install the […]
My First Snap: DevOperator
I have published my first Snap in the Snap Store. DevOperator is a bundle of several tools used to manage applications and Kubenetes clusters inside AWS. This version includes: Ansible AVH git flow AWS CLI aws-iam-authenticator eksctl kubectl mfa & assume-role Terraform tf It’s a red letter day!
Add the git branch in your bash prompt
To include your git branch in your bash shell prompt, add this to your .bashrc and start a new shell window. This is what you end up with. The git branch only shows up when you are in a directory that is part of a git repository. This implementation relies on gawk. If you do […]
Adding ssh-agent to a Chromebook Linux VM
I just got a Google Slate, largely because it can run Linux programs. By default, ssh-agent is not running when you open a terminal window. To add it, I created and enabled a systemd service for ssh-agent and I created the environment variable. Create ~/.config/systemd/user/ssh-agent.service [Unit] Description=ssh-agent service [Service] Type=simple Environment=SSH_AUTH_SOCK=%t/ssh-agent.socket ExecStart=/usr/bin/ssh-agent -D -a $SSH_AUTH_SOCK […]
Using the JetBrains PhpStorm HTTP REST Client
I’ll admit it: I have previously tried and failed to get the new HTTP REST client in JetBrains PhpStorm to do what I wanted, especially with POST requests and file uploads. This morning, the stars aligned properly and my magic beans sprouted and life is beautiful. Here is the code. It does a POST call […]
Installing rdiff-backup on Synology DS218+
This post is outdated. See Installing rdiff-backup 2.x on Synology DS218+ Diskstation instead. I just got a Synology DS218+ NAS box running DiskStation Manager (DSM) 6.1. It supports rsync but not rdiff-backup, which I have been using and loving for about 10 years. Getting rdiff-backup running on the Synology DS218+ was surprisingly easy, in large part […]
Amazon S3 for Photo Backups
I have a little problem. Well, maybe it’s a big problem. I need a backup of the /home2/art directory on my computer. All told, it contains about 19,000 photos, a few full length movies, the video from my wedding, and some audio. It weights in at 227 GB. My /home/art directory has another 17,000 photos but, since […]
Heartbleed Relief: Replace the Default SSL Certificate in Parallels Plesk Panel
If you have a web site with an SSL certificate then you are probably affected by the Heartbleed vulnerability which popped into general visibility. If your server is vulnerable, you need to do two things: Update openssl Replace your SSL certificate (since you have to assume that the certificate’s private key has been stolen). Anyone […]
MySQL + UTF-8 + PHP 5.3.10 + JSON = Trouble
Yesterday, I spent longer than I care to admit debugging an update to an old PHP script. It fetched a string from a MySQL database and (here’s the new part) passed the string to json_encode(). That call failed when the data included the multibyte characters ¼ or ½ or ¾. All of my attempts to remove the multibyte […]
Python Singleton
I needed a singleton database class in a Python 2.7 program and wrote it this way. class Singleton(type): _instances = {} def __call__(cls, *args, **kwargs): if cls not in cls._instances: cls._instances[cls] = super(Singleton, cls).__call__(*args, **kwargs) return cls._instances[cls] class Database(): __metaclass__ = Singleton def __init__(self): self.db = MySQLdb.connect(…) I like this pattern but I realized that […]
Read-Only Python Properties
Following onto yesterday’s post about Python Properties and @property, there is a neat little trick to create a read-only property of a Python class. All you have to do is omit the setter. This Hero class has a read-write property “name” class Hero(object): def __init__(self, **kwargs): self.name = kwargs[‘name’] @property def name(self): return ‘%s %s’ % […]
Python Properties and @property
My son pointed me at PyCharm and, while poking through it’s built-in “intentions,” I discovered Python’s @property decorator, which led me to learn more about the Pythonic way to handle class properties. Unlike Java and C++, Python encourages you to create public class attributes (a/k/a properties). Here is an example: class Hero(object): def __init__(self, **kwargs): […]
Just Ordered My WordPress 10th Anniversary T-Shirt
It’s hard to believe that I have been writing this blog for almost eight years and that WordPress (the software which drives this web site) is going on ten years old. To celebrate both, I just ordered my WordPress 10th Anniversary T-Shirt.
$76 Media Center
Several years ago, we got a Sony PlayStation 3 as a home theater PC and it has been a fantastic way to watch Blu-ray discs, Netflix, etc. It has not been a good way to listen to music for two reasons. First, listening to music requires me to turn on the home theater projector, since we […]
Software Jobs
By day, I own a software company and occasionally write software. Wally, Dilbert’s friend, reveals all about my job in today’s strip. Click the image to read the whole comic. The disturbing question is: Which job do I hold???
Real Virtual Alchemy
I have learned to change lead into gold, and back again, for real! Well, sort of. Thus far, it only works within the virtual world of programming languages like Python. Here is the recipe. (If you are not into geek-speak, skip to the bottom where I natter on about reading ebooks on an iPad.) class […]
Python Generators Neatly Untangle Loops
The Python programming language has become my first choice for most tasks over the last year or so. The more I use it, the more I find to like about it. I just stumbled across generators in a way that made them make sense to me and it is so cool that I want to […]
Server Backups are Important
I got a frantic email from a friend this week. One of his subcontractors went crazy and trashed several of my friend’s clients’ web sites as well as my friend’s own business site. The police have been involved but much damage has already been done. I wish I had been hosting my friend’s sites. Had I […]
Step 3: Google Chrome to Replace Microsoft Windows, Apple OSX, and Linux
As I predicted in Google Chrome to Replace Microsoft Windows, Apple OSX, and Linux (September 2008) and again in Step 2: Google Chrome to Replace Microsoft Windows, Apple OSX, and Linux (December 2008), Google is moving to replace the operating system, not just the browser. What changed two days ago is that Google is finally […]
NSA Illegally Collecting US Citizens’ Email
I am not surprised, but I am still dismayed, by the continued erosion of our personal privacy in the shadow of George W. Bush’s administration. The New York Times reports in E-Mail Surveillance Renews Concerns in Congress that the National Security Agency (NSA), as recently as early this year, is illegally collecting email from Americans: […]
- 1
- 2
- 3
- 4
- Next Page »