Category: Techy

At Trustroots we’re experimenting with virality. I found maître, and it looked awesome. I reached out and they gave us a 50% discount. Great start. We setup the campaign, deployed, and then found a small glitch and had difficulty with our specific use case. Chatted with their support, and by the time I read their reply, they had deployed all three suggestions I made.

They’ve set a whole new bar for exceptional customer service. If you want to run viral campaigns, I highly recommend checking them out via my affiliate link!

I recently ditched all but one of my dedicated servers and decided to switch to shared hosting for all my PHP / WordPress sites. First I tried TMDHosting, had a serious issue, cancelled that, and then switched to SiteGround. I prepaid for 2 years. Might have been a big mistake.

Site disappeared

First, an entire site disappeared from their server. I had a copy in an old backup, but otherwise the site files and database had disappeared. Their support had nothing useful to say, and suggested it had to be my mistake. Possible, but highly unlikely that I accidentally deleted both the files and the database.

Sites offline

Yesterday I had an issue with permissions. There were 4 .well-known folders in my sites directory that were owned by root. I noticed because the letsencrypt installer didn’t work. Created a ticket, they fixed permissions on 1 of the 4 directories I had listed. I updated the ticket. They replied saying they’d fixed all 4. Many of my sites went down. 403 error.

Solution

I’m travelling in Seville. I was out. I turned around and went back to the apartment, jumped on live chat. They told me that somebody would reply to my ticket within 20 minutes and there was nothing else they could do. I logged in, checked permissions, found one site that worked, and fixed the problem.

Turns out that on several of my htdocs folders, the “other” r-x permissions had been removed. Evidently nginx was unable to access my sites. Today I see a reply to the ticket saying that they didn’t change anything, and they’re glad my sites work again. WTF?

What do I do now?

Two serious failures. The second caused real downtime, albeit a few minutes because I fixed it myself. Any recommendations on a good shared hosting provider? What do I do about my 2 year prepayment?

Now that composer is shutting down, I’m looking at how to send posts to Facebook, Twitter, and maybe LinkedIn while keeping the original here on my WordPress site.

The most “official” option is JetPack from Automattic, the makers of WordPress. It’s easy to setup, but it doesn’t work perfectly on Twitter for my setup. I spent today trying options, including this plugin. The plugin is a bit complex to setup, but is super powerful. You need to pay for Google+ support though.

The only change I wanted to make to Jetpack was to use the post content as a title on Twitter, when there is no title. So if I post a status update with just a body, that should go to Twitter, not an empty title an a link to the blog post.

I started here. Turns out that approach doesn’t work. Or at least, after 4 hours of debugging, I couldn’t get it to work. No, in fact, I’m 90% sure it doesn’t work after I finally read the Jetpack code. Wow, what a time sink that turned out to be.

Finally, I got it running. I use the publicize_save_meta hook, check if we’re publishing to Twitter, and if we are, and there’s no post title, and no custom message already set, I set the custom message to the post body, trimmed.

*124*P# – set this device priority P (1-3) or 0 to disable, doesn’t seem to work

*125# – route SMS here
*126# – route MMS here

These are all USSD codes which you run on the phones to configure the call routing. I couldn’t get the priority to work, it maybe isn’t supported by simplytel (Drillisch) as a reseller of o2, not sure. I got this info here.

The memory upgrade from Crucial arrived this morning. After an initial false start and three beeps, we are up and running. Apparently memory has to be paired between slots 1 and 3, and slots 2 and 4. After that hiccup, we’re on fire! Here’s the obligatory before and after shots…

I noticed on the screenshot, that apple actually publish instructions on how to upgrade, fantastic! Now I have ~14GB free, with all my browsers open. Fabulous.

There’s a wonderful package called pam-ssh-agent-auth which allows sudo authentication via the SSH agent. This means no more typing passwords for sudo. Instead, just connect with ssh -A to forward your agent, and then use sudo without a password.

We just deleted an old private GitHub repository. Before we did, I wanted a copy of the issues. Turns out, it’s super simple with curl. Of course, you can backup the repository itself very easily like:

Then to get the issues, first I created a new personal API token on GitHub. Then, took a minute to figure out, but you use that as the username with a blank password or a password of x-oauth-basic. Then the curl command looks like:

If you got everything right (which I didn’t the first 5 or 10 times…) you should get a JSON document containing the issues of that repo. There will probably be multiple pages. Personally, I used curl -sSi and piped to less, then I saw the links for page 2 and 3 in the headers. I repeated the process by hand and dumped all three pages into .json files.

There are tools available to automate this, but the whole thing took me less than 15 minutes by hand.

Some lessons I’ve learned in my year and a half with CrashPlan. Please note, this is an advanced guide to CrashPlan. You have been warned. I assume you’re already familiar with CrashPlan and understand their backup sets, etc.

This post covers several topics (and I might update it later if I remember or discover more).

cron vs anacron

backup speed

file selection verification

Cron vs Anacron

Personally, I consider this a bug, and one that CrashPlan ought to have fixed a long time ago. When configuring “Verify selection every”, if you choose a number of days and a time of the day (which is the default), your backup verification will only happen if your computer is on at the scheduled time. Ala cron.

However, if you choose a number of hours < 24, and your computer is off at the scheduled time, the backup verification will run as soon as the computer is on again after the scheduled time. Ala anacron.

Bottom line, for your most important data, set the verification to run every 23 hours and accept that it’ll happen at inconvenient times of the day.

Backup speed

For a long time I felt like CrashPlan took forever to run backups. Eventually, more than a year after using the service, I decided to investigate. I found some excellent articles.

I discovered this after I decided add ~500GB of media on a USB disk to my backup sets. After making these changes, the backup took about 6 weeks instead of 3 months! I regularly saw upload speeds of >6Mbps on connections that would support it, I was moving a lot during the 6 week upload period!

File selection verification

This is an optimisation I’m only now figuring out nearly 2 years into my CrashPlan adventure. If you’re backing up a large folder of very infrequently changing data, put it into its own backup set. For example, I backup ~500GB of audio and ebooks. I almost never add to the collection.

By putting this into a separate backup set from my photos I can run a manual file verification of the photos without also waiting for the verification of 1’000s of book files which I know have not changed. My advice is the more backup sets the better.

Note that if you split one backup set into multiple smaller sets, you will lose the history, including any deleted files, previous versions, etc. Best to set this up from the beginning. But remember CrashPlan is a backup system, and it should not be confused with external storage.

Conclusion

CrashPlan’s java app is horrible. It’s slow, ugly, and a PITA to use. If I could find a better alternative, I’d switch in a heartbeat, I have zero loyalty to CrashPlan. However, having said that, as of my last research, CrashPlan is simply the only contender in the market. The defining characteristics for me are:

Client side encryption with key that is unknown to my backup provider.

I recently got a Samsung Note 10.1 2014 edition tablet. I wanted to replace paper note taking. I’ve been in a lot of meetings recently, and I write notes, mostly to aid in remembering the points, I rarely actually refer to them. Aside from the need to always have paper and pen, this was generating a substantial amount of paper. So I did a little research, and settled on the Note 10.1. The NotePro, essentially the same device in a 12.1 inch size, was interesting, but felt less portable, and too heavy to easily hold in one hand.

For its intended purpose, I’m extremely satisfied. The S Note application is excellent. It has a few quirks, like only having on default page which must be either portrait or landscape, but aside from that, it’s very good. The pen feels good writing on the screen, not quite as good as a ballpoint on paper, but certainly good enough for extended writing sessions.

I got a case with a hand strap. Turns out this is an excellent feature. When I’m holding the tablet portrait (subject to this bug), the handle makes it possible to hold the tablet with one hand and write on it with the other. It’s too big to hold in one hand without this strap, so I had to always put it down on something in order to write on it. The case was a big improvement, and I’m happy with the quality of the case so far.

The tablet includes a one year subscription to Evernote premium. I’ve installed Evernote on my mac (was going to do that anyway), and now my handwritten notes are synced automatically from tablet to laptop (and phone). If one ignores the concerns over privacy in having all my data unencrypted on an American corporation’s servers, it’s absolutely fabulous! 🙂

I haven’t used the tablet much for browsing the web. Firefox is my browser of choice, and it’s pretty poor on a tablet. The interface doesn’t change much from the phone, despite the extra screen space. Chrome is slightly better, but doesn’t sync my tabs, etc with Firefox on my laptop.

Bottom line, for its intended use of note taking, the tablet has worked out great. I’m very happy with it, and the other stuff it can do is an added bonus. It is an expensive note taking device, but automatic syncing was a huge win over solutions like the Boogie Board or Livescribe where notes have to be manually downloaded onto the computer.

We recently received a letter from a German lawyer alleging a copyright violation. Time to say auf wiedersehen to internet surveillance and censorship! 🙂

Many VPN providers accept payment with bitcoin. Some have zero log retention policies. Current front runner is ironsocket. But they all need an email address. So, how to get a reasonably anonymous email address?

I first tried Hushmail. Free signup, easy. But, I need to login every 3 weeks or my account is suspended, and the only way to get it back is to upgrade and pay $35/year. Too expensive.

Second step was MailFence. They need an existing email to verify my account, but they accepted my hushmail address, and maybe they’d accept a mailinator address. Account is free, doesn’t appear to expire, but doesn’t support POP / IMAP.

How to use it?

I’m wondering how far to go. I could create clean email addresses via tor, pay for a VPN with bitcoin, and in theory, have an untraceable VPN account. However, every time I connect, my originating IP would be visible, and so I’d be easily trackable. Given all of that, maybe a totally clean email address is overkill. There’s also the anonymity of the bitcoins to think about…

I was looking for ways to control a presentation from an android phone. Turns out LibreOffice has this baked right in, it’s called Impress Remote, it’s free, it’s open source, and (in theory anyway) it’s awesome!

Turns out, LibreOffice 4.1.5.3 would not auto update to 4.2, I had to download version 4.2 manually and install it as normal. Version 4.1.5.3 on OSX wouldn’t work over bluetooth or WiFi. Since upgrading to 4.2 I’m delighted to report that WiFi works. Bluetooth still doesn’t work, but apparently WiFi is faster anyway.

It’s really a smart system. I can see the slides on my phone, there’s an inbuilt timer (although only small letters), and swiping the screen advances the slide (about a second later). Here’s hoping it works for tonight’s presentation on Reputation Coin! 🙂

Colloquy is my IRC client of choice since switching to OSX. In busy channels, my screen can be overrun with messages telling me who joined and left the channel. I wanted, not to hide these, but to make them much smaller, and put them all on one line.

It turns out that it’s possible to modify Colloquy’s appearance with CSS. Awesome, CSS and I are old pals. Took me a while to figure it out, but here’s the code.

Open Preferences, then Appearance, then option click Customize Style… and the CSS file will be opened in your editor of choice. Then type /reload style in a channel to see the new style in action. Here’s the obligatory before and after screenshots.

We use papertrail to aggregate log data from our servers. Awesome tool. I wrote a simple GreaseMonkey script which highlights the names of our servers. Very easy to do. Could equally have built it in Stylish, but I already use GM, so that’s how it went. Here’s the code as per a request from Henry.

My first mobile app now actually works! At first I had issues because getCurrentPosition doesn’t actually fire up the GPS in PhoneGap, but I switched to using watchPosition instead and that seems to work well enough. It’s crude, but hopefully it’s good enough for my personal use and will save me a little time. Updated info here including a QR code.

I’m playing with Instagram posting photos from there onto here. I’ll probably post a few photos and delete them again. IFTTT has a few recipes that will push my Instagram photos onto my WordPress install.

In a little over 3 hours I’ve built my first ever Android app. In fairness, I had already installed the Android SDK previously, so all I did this time was brew install node && npm install cordova and then a bit of farting around to get it working. Eventually, I found cordova run android, which is a big help. Build, install and run the app on an attached phone. Genius.

My next step is to figure out the whole Play Store upload nonsense. I guess I’ll talk to Kasper about that. I might also shoot for the App Store and one or two others also, thanks to the unlimited free open source builds on build.phonegap.com.

It’s called FindMyCar and it has two buttons. Park, and Find. When I park, I hit park, and it remembers where the car is. Then later when I’m lost I hit find and boom, it launches a map / radar / etc with the location of the car. I’ll test it over the coming days. If you’re eager to try it yourself, see code or the apk. Obligatory screenshot:

Working on a project with more than 200k spam comments in the WP database. Trying to use the “empty spam” button in WordPress just doesn’t work, it deletes a few tens of thousands before hitting the 30 second PHP timeout.

I searched around and found a few suggestions to delete from the wp_comments table. However, that ignores the 3x as many rows in the wp_commentsmeta table if you’re using akismet. This query does the job, although for 200k comments it does take a while!

DELETE c, m FROM wp_comments AS c LEFT JOIN wp_commentmeta AS m ON m.comment_ID = c.comment_ID WHERE c.comment_approved = 'spam';

I’m experimenting with Mandrill and every domain I’ve added, including some I added months ago, were showing “MX: Invalid”. The MX records were in place, for one domain, they were in place before I added the domain to Mandrill.

When their support helpdesk got back to me, the solution was simple. I had to click the “Test” button next to each domain. What a PITA. I waited a couple of days to click a damn button that I found no reference to in their documentation. Bah humbug.

A while back I installed apticron to get an email when updates were outstanding on our servers. However, it emails for all updates, and there are updates released every day, which means I get one email per server per day, useless noise that I end up ignoring.

Today I built a solution, security-update-notifier. It’s a very simple (crude!) shell script that can be scheduled with cron to generate an email each day when there are security updates pending. It relies on apt-check, part of the update-notifier package.

We manage our machines with puppet, so I built my first ever public puppet module, a simple wrapper around the script. Tomorrow morning at 4:44am I’ll hopefully get an email for one server. I’ve left one with updates outstanding, one with only non-security updates outstanding, and one up to date, to test each case. Fingers crossed.