Long-winded intro paragraph where I try to increase SEO by repeating the post title a bunch of different ways, then say, “Keep reading to find out how!” so you’ll scroll past a dozen ads before I finally explain how to do the thing… maybe.

Just kidding. Did you know you can not only block both ads and trackers but also Pinterest results using a browser extension called uBlock Origin? Well, you can. Here’s how.

1. Install uBlock Origin if you haven’t already.

Firefox: Get it here.

Chrome-based browsers (Chrome, Edge, Vivaldi, Brave, etc.): Get it here.

2. Open uBlock Origin’s settings.

There are different ways to do this. In Firefox, a common way is to: Click the uBlock icon (usually in the top right), then click on the gears.

Image showing how to open the uBlock Origin extension settings in Firefox

In Chrome, a common way is to: Click the Extensions icon in the top bar, then the vertical dots next to uBlock Origin, then Options.

Image showing how to open the uBlock Origin extension settings in Chrome

3. Click the “My Filters” tab and paste this:

! Pinterest Results on Google
google.*##.g:has(a[href*=".pinterest."])
google.*##a[href*=".pinterest."]:nth-ancestor(1)

The result should look something like this:

Image showing what the above text will look like when pasted into the 'My Filters' tab of uBlock Origin's settings

(You may already have some stuff in your “My Filters” tab. If so, just add that code above to the top or bottom.)

4. Mash “Apply changes”.

You should now hopefully find your Google Image Search results free of Pinterest-sourced images.


Have you noticed this appearing in your context (right-click) menu?

Screenshot of the offending and unsolicited 'Share with Skype' optionHave you wished to stop noticing it, because it wasn’t there? Well, one option you have to get rid of it is to simply uninstall Skype. But if that feels a little extreme, we can remove it with a registry tweak.

Other tweaks I’ve tried before to banish this thing have involved searching the registry for variations of “share with skype” or “sharewithskype” or “skypesharing”, and while finding those items and removing them helped for a while, it never lasted, because they would just change the name and put it somewhere else. Because I guress Microsoft just really really wants you to have this option whether you asked for it or not. Anyway, let’s avoid a tangent rant about Microsoft’s corporate psychology by just getting to the point.

We’ll explicitly block Skype from putting stuff in the context menu.

And we’ll do it like this. Open your Registry Editor. (If you’re unfamiliar with this, here’s one way to do it. And here’s another.)

Now navigate to:

Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions

If you haven’t done this before, you do it by double-clicking folders in the left sidebar until you get here:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell ExtensionsNow we’ll add a new key (those things that look like folders) called “Blocked”. (Skip ahead if you already have it there.) Right click on the Shell Extensions “folder” and choose New > Key.

Adding a new key in RegeditIt will appear as “New Key #1”. Change the name to Blocked. Once that’s done, make sure the Blocked key is selected. (Double-click it if you want to be sure.) You should be looking at something very much like this:

Screenshot of the newly added Blocked registry key

Right-click in the empty space to the right, then choose New > String Value. For the name, give it this:

{776DBC8D-7347-478C-8D71-791E12EF49D8}

Yup, exactly that, with the curly braces and everything. Once that’s done, double-click that weirdly named entry, and under Value data, enter Skype. The end result should look like this:

Screenshot of our new key and string with name "{776DBC8D-7347-478C-8D71-791E12EF49D8}" and value "Skype"Now log out and back in again–or simply restart your machine–and your context menus should be Share-with-Skype free.

The TL;DR version:

Add the REG_SZ key "{776DBC8D-7347-478C-8D71-791E12EF49D8}"="Skype" to HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Blocked and reboot.


Problem: You try to clone/pull/push to a GitHub repo and you have 2FA enabled. It asks for your password, you give it, and you’re told “Invalud username or password” and/or “Authentication failed for your_reponame.”

root@f5bcc0000a:/# git clone https://github.com/awesometoast/professorcoolbread
Cloning into 'professorcoolbread'...
Username for 'https://github.com': awesometoast
Password for 'https://awesometoast@github.com':
remote: Invalid username or password.

Solution: You need to use a personal access token instead of your password.

Make one by logging in to your GitHub account. Mash your avatar in the top right, then mash Settings. At the bottom of the sidebar on the left, you’ll see Developer Settings. Mash that.

Or you can just use this URL: https://github.com/settings/tokens

Hit Generate new token near the top of the page.

When you’re asked to “Select scopes”, click repo. You can add more if you need to, but this is the minimum.

Hit the green Generate token button at the bottom of the page. GitHub will hit you back with your new token.

Save that token somewhere secure. Next time you try to git from a command line, paste that token instead of your password. Don’t worry, you won’t need to do this every time.


The Synology RT2600ac router is, in my opinion, very good. That said, there’s a chance you may encounter a show-stopping issue when setting up a new one. On the 2nd setup screen, you might see a field for Country. It looks like a drop down, but it has no options. Manually typing a country name doesn’t work, either.

Screenshot of useless Country input

Worry not. You don’t need to return it. We can fix this by doing a factory reset.

Yes, a factory reset on a device you presumably… just got from the factory. I know.

Grab a paper clip (or something similarly small and poke-ey) and do this:

  1. Make sure the router is on.
  2. Find the RESET button on the back. Poke it with your clip or other poker, and hold for at least 10 seconds. You’ll see the LEDs on the front flash as if the router were rebooting. That’s because it’s rebooting.
  3. Don’t panic while it takes several minutes to come back up.
  4. Try the setup again.

When you get to the 2nd screen, the Country field should be completely gone, and you’ll be able to proceed.
Huzzah.


macOS uses VNC for remote management, and has a built-in server and viewer. (Turn on the server under System Preferences > Sharing and mash the checkbox for Screen Sharing.)

But if you’re here, you probably knew that already, and you want to change the default VNC port from 5900 to something else.

Get out your terminal:

sudo nano /System/Library/LaunchDaemons/com.apple.screensharing.plist

Or use vim, or whatever. It’s your party. Your terminal party.

You’re looking for this line (line 34 in El Capitan, and since Lion):

<string>vnc-server</string>

You want to change the text “vnc-server” to whatever you want your port to be. For example, this would make it port 1337:

<string>1337</string>

Don’t use port 1337.

Then turn Screen Sharing off/on again in preferences, or restart your machine. It should use the new port now.

Connecting to it from a Mac

Use the built-in VNC viewer by going to Finder > Go > Connect to Server… Under “Server Address” enter:

vnc://your.ip.or.hostname.here.com::1337

Moving to Mandrill to SparkPost this week? (A lot of us are thanks to this.)

In Mandrill (and possibly other transactional email services) we can use the API to send emails using templates. We send a bunch of information including recipients, content, metadata, and subject, ad we let ‘er fly. Boom, done.

For the most part, I’ve found SparkPost to be pretty similar, except on one point: subject lines. Specifically for emails sent using templates. When you’re using a template, several options in your API call get ignored, including “subject”. It defaults to whatever you set when you created the template in the SparkPost UI. (It’s a required field.)

Worse, at the time of this writing anyway, there’s no clear way to fix it. It isn’t specifically covered in the documentation, and the support center answers (such as this one) are… not ideally helpful, we’ll say that.

But there’s good news. After losing a fair number of hours and hitpoints on this, I found out that…

It’s actually pretty simple

With SparkPost templates, we fill our template placeholders (name, content, etc) with curly-bracketed variables such as:

{{name}}

(Details on this are in their docs over here.) That’s what we put in the template to specify that this is the placeholder for the ‘name’ field in the substitutionData JSON array we’re sending them. Here’s a simple example of that part of our API call: (Also called a “transmission” in SparkPost world.)

{
   "substitutionData": {
      "name": "Tester Gunderson",
      "astrological_sign": "Quagmire",
      "favorite_color": "blue",
      "main_email_body": "This message is to transactionally confirm that your sign is 'Quagmire' (we didn't know that was a thing) and your favorite color is 'blue'."	
   }
}

Throw a key in there for Subject

With the rest of your substitutionData, add your desired subject line:

"subject": "We're sending this email to blue-loving Quagmires"

And then in the SparkPost UI, edit your template and change the subject line to {{subject}}. (Or whatever you want to name the variable.)

Setting dynamic subject lines in SparkPost templates
Yep. You can put variables in there.

 

And you’re done.

Well, maybe. It depends on your use case. If you want to add dynamic variables to the subject line (like the recipient’s first name) you have another battle ahead of you. Hopefully, as more of us former Mandrill users migrate over certain questions can be answered more clearly than they are as of the time I’m writing this. (April 19 2016)

Good luck out there!


At least as of version 1.5.1, the awesome Vitalets Bootstrap X-Editable plugin has a maximum date for its datepickers of 2015. Why? I dunno. I just work here. But it’s a simple fix.

After you get things rolling by applying the plugin to whatever element, like so…

$('#thing').editable();

Change the default maximum year thusly:

$.fn.combodate.defaults.maxYear = 2531;

Or whatever year you want.

While you’re there, you could also change the minimum date to something a little more recent than 1970:

$.fn.combodate.defaults.minYear = 2010;

If you’re like me, you don’t love it when your Mac makes that sign-in sound every time you open the lid. (Assuming you use iMessage/Messages for any IM services.) Here’s how to disable it. (And only it.)

  1. Make sure Messages is closed.
  2. Go to your Applications folder.
  3. Find Messages.app and right-click it. Choose Show Package Contents.
  4. Find the Resources folder.
  5. Look for a file called Logged In.aiff.
  6. Delete that mess.

Next time you open it, that sound will be gone. (Note: This may not work on El Capitan.)

 


If you’re like me (and I know I am) you don’t love having a bunch of unnecessary stuff loaded when you don’t need it. Like Adobe’s Creative Cloud thingy. It can drain your battery (not by a lot, but still) and clutter up your menu bar.

Adobe Creative Cloud menu bar icon

Also, according to the Little Snitch app, this thing is pinging over dozen different IPs and domains across the interwebs at times. I mean, I understand pinging a couple, but this feels a little extreme.

Anyway. It gets loaded from here:

/Library/LaunchAgents/com.adobe.AdobeCreativeCloud.plist

Run this in Terminal to disable it for your user:

launchctl unload -w /Library/LaunchAgents/com.adobe.AdobeCreativeCloud.plist

If you find you miss it, bring it back thusly:

launchctl load -w /Library/LaunchAgents/com.adobe.AdobeCreativeCloud.plist

You can also delete that .plist after running launchctl unload to shut its shenanigans down even further. I haven’t done that, though, so proceed at your own risk on that one.


Surprisingly, Apple has actually made this pretty easy. This works for Yosemite and El Capitan, and I’m assuming future versions too.

Make sure you have the installer downloaded from the app store. It will delete itself after you use it, but you can download it again.

Format an 8 GB flash drive and plug the thing in. Leaving it named “Untitled” is easiest, but you can change it. Just make sure to change any instances of “Untitled” in the command line below.

For El Capitan, Bust our your Terminal, and copypaste this:

sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app --nointeraction

Pretty much the same for Yosemite:

sudo /Applications/Install\ OS\ X\ Yosemite.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ Yosemite.app --nointeraction

Blog Pages