Recent blog posts
I was messing with E2E testing of WordPress, and it was going okay, but I hit a wall when I needed to mess with one of the options, to turn of a CAPTCHA. You don't want to use deal with CAPTCHAs during a test, at least not every test. There may be some where you want to see the CAPTCHA.
The right way to do this is to flip options on and off.
Okay, you've done it, but it's still not working.
The problem I keep having is that I clone repos via HTTPS rather than git, so my settings need tweaking.
.git/config usually has a line like this:
So, I need to change the URL, replacing the first part with "email@example.com:" I also like to add a setting for [push] to get rid of the long mes
This is here so you can laugh at the first mistake.
Gotcha: resolve(), not return:
Spot the bug:
It's probably easy, given the headline. Line 3 is in error. It should be:
"return" exits the function.
I was having a hell of a lot of gotchas related to redrawing a D3 chart within an Angular view. It was looking like something on the Angular side was causing my DOM references to break. Maybe ng-route redrawing views?
That was bad, because my charts were being appended to a DOM element that had been passed from Angular over into D3 via a config object. It worked before changing routes, but when you toggled through routes and returned to the chart, it couldn't be redrawn.
There are several ways to implement the Fluent Interface in JS, and this is one I was using in a project, and halfway forgot.
This is a short howto about setting up VirtualBox with a Docker environment in it.
Set up a clean Debian VM with the regular install, a 10G disk, and nothing but the SSH server packages. (I have started to just use the Vagrant setup, which uses the username vagrant and password vagrant, in case I want to convert it to a Vagrant image.) Download the VirtualBox Guest Additions CD and, as root, do these things to prep the virtual box to install the drivers.
Run the following.
I have been working on March for Bernie on the side, for free of course. It's a WordPress site with a theme from Bernie volunteers.
This is a rough note, because I finally figured this out after several hours of trying. If I'm wrong, please email me, and I'll fix it.
I had a problem because I wanted to centralize my $http requests in services rather than having XHR calls in controllers. My first attempts used callbacks, but I wanted to convert them to promises, which are a lot nicer. Thus, I had to test promises that used $http.
I must admit that I'm fully drunk on the Kool-Ade.
The tl;dr : testing isn't just writing tests, but also using mock objects and services to simplify testing, and using package managers to port code to new versions of modules. It takes days to learn how, but it's worth it.
This article describes how to use Python's logging library to send logs to syslog. Then, using rsyslog, a fancier syslog, we produce a log of pre-filtered output.
I have a process that runs a few times an hour, and it spits out results to STDOUT, which cron dutifully emails to me.
If you go to the home page you can add a site-limited google search to your search bar. Google isn't too nice about it, but it'll work.
This script sets up both python 2.* and python 3 virtual environments in a directory.
Why bother? Because this is a way to redeploy the environment on an empty computer.
2010 is upon us, and unlike the Arthur C. Clarke sequel to 2001, wherein the world is exploring space, in the real 2010, the world is trying to find a goddamn job and avoid a huge, double-dip recession and rapid price deflation.
This is a collection of related notes. I will not be updating them as I'm not using the platform at this time.
They're out of order, but there's a lot of potentially useful information in here. Maybe I'll compile it into a short ebook at some point.
I've been putting ads on here for years, and they have basically failed. On other sites, it's actually OK, making a little trickle of money, which is so weird. Lately, I've been looking at the ads on this site, and sometimes I click them. It's not click fraud because I'm actually interested. So they are working. Then I put up this hideous ad with a big stack of text ads, and I wanted to click more than one of them.
These ads work on me now.