Hidden Killer

While working on Scott’s Thermal Cap, the brim, the band around the head, involved 32 discrete stitches per row. The pattern I was using demurred on chaining up the side and instead relied on the natural height of the SCTS to provide the height required as rows were added. Because the chain was omitted, every stitch requires attention, because usually when a chain appears on the side, it “uses up” whatever stitch was next in line, and so you customarily have to skip “where you should go” for the “next spot”. Without the chain on the side, progress is slower, the weave is thicker, and counting becomes rather picky. You want to make sure you have 32 in each row, lest you have decreases where there shouldn’t be any, and your hat comes out looking obviously wrong.

There are a lot of tools for maintaining counts in Crochet. Little plastic barrel counters, clickers, and a few apps for the iPhone. There was one of these apps, that among all the other features also had a verbal input mechanism. The app was updated and the verbal input mechanism was deprecated for Voice Control in iOS.

I have another app, called MultiTimer, in it are counters with audio feedback when you tap them. I had been using this app to count stitches in my work, but its a little annoying to have my hands on the work and then reach over to tap the phone. So I did a little poking around:

  1. Settings
  2. Accessibility
  3. Voice Control (turn it on, it downloads extra iOS components)
  4. ON: Show Confirmation, Show Hints, Overlay: Item Numbers. OFF the rest.
  5. Back to Settings, then to Control Center
  6. Customize Controls
  7. Add Accessibility Shortcuts
  8. Out to Home Screen

So, when I am working on a project, I plug the phone in (since Voice Control is a battery pig), start MultiTimer, switch to my Crochet panel where I have set up all my counters. Then I swipe up from the bottom, tap Accessibility Shortcuts icon, tap on Voice Control, then swipe down to hide the Control Center panel. Overlaid on top of all the screen items are little shaded numbers, so I focus in on the counter that I care about, “Stitch Count” and then I can say “Single Tap” to advance the counter, or “Tap 6” to clear the counter, or “Tap 4” to decrease the counter. That enables me to keep my hands on my work, and my eyes, and just say clearly what I want and the phone makes a little click sound when it does what I want. That way I can concentrate on the work, and then look at the display for the count. When my work session is done, I swipe up from the bottom, tap the Accessibility Shortcut icon, turn off Voice Control, and exit the MultiTimer app. Done and done. This way I can keep my mind focused on the work, I don’t lose count due to interruptions or cats, and it makes my phone do one singular task really well. After I started using this feature, I took back a little bit of the gripes I had previously issued against iOS, just a few. 🙂

Derailing Robocalls

If you have an iPhone as your mobile device, you can set up a foolproof filter for pretty much all Robocalls, unwanted solicitations, or anything else that bothers you with multiple calls on your mobile phone.

The first step is to create a Voicemail Greeting that lets people know that they have to introduce themselves with their numbers first, and then once they exist in your Contact List, then your phone will ring and you might answer it. If your callers don’t know, then they will never get through.

The second step is to make sure your Contact List in your iPhone is as up-to-date as you can make it. Trim out any junk, do your best to de-dupe the list, get it so it is nice and tidy.

Third step is to go into Settings, then to Do Not Disturb settings, Turn Do Not Disturb ON, set Schedule if you want it off, although I just leave my phone on DND permanently. Silence Always, and in the Phone section, “Allow Calls From” and set that to “All Contacts”. Turn Repeated Calls off, and any other setting is your personal preference.

When inbound calls arrive, they will be checked via their Caller ID presentation with your Contact List. If they don’t know which number will match in your Contact List, then your phone will never ring. It will obviously ring for the caller, until they arrive in Voicemail, and then they leave a message introducing themselves, which is after all, a civilized way of using these devices. If you met someone IRL, then you’d have to create a contact for them in order for them to ring your iPhone.

If you have any other iOS device, like an iPad, you should configure that the same way as your iPhone so when it is connected over Wifi it doesn’t ring the way you don’t want it to.

After that, you won’t get any more inbound calls unless they are from your Contact List. No fuss, no muss.

iOS 7 and iMessage

After I upgraded to iOS 7 on my iPhone 5 I ran into a really annoying problem. Whenever I would send iMessage messages to friends and family the message would look like it’s sending and then the progress bar along the top would stop about 1/4 inch from the end and just stay there for hours. Never sending the message. I tried the Kung-Fu Grip to only partial avail. The solution is to reset the network settings on the iPhone:

Tap Settings
Tap General
Tap Reset
Tap Reset Network Settings

Once the phone resets, and you reset your Wifi and turn on all the cellular bits, like voice and data roaming (at least for me) then after that, everything works as it should.

If this helps you, please let me know. 🙂

Automatic Tag Generator for DayOne Journals synced with Dropbox

Here’s how I created a system to automatically sync up keywords to tags in DayOne Journal. The journal is stored on my Dropbox, so if you have it in iCloud, I don’t know what you’re going to do.

First Step: Get text list of tags in a text file: (do this in the entries folder of your DayOne Journal, cd to it, if you can’t, google-fu.)

find . -type f |xargs sed -n “/<array>/,/<\/array>/p”|grep “<string>”|sed ‘s/<[^>]*>//g’|sed “s/^[ \t]*//”|tr -d ‘\011’|sort -f|uniq > tags.txt

Then copy this tags.txt folder to your home directory. Edit the file, be careful of phrases in XML that would confuse the system, Weather, Apple, DTD, String – that sort of thing, also be very careful around TLA’s as they can have unintended side effects. The later scripts that do the keyword searches don’t give a damn about cases, so your keywords or your KeYwOrDs will be equivalent.

You’ll need two more scripts. This one adds tags based on keywords passed to it as parameters: (be VERY careful, little L and capital I look very much the same, read man pages, yo)

tag.sh:

#!/bin/bash

cd /Users/username/Dropbox/Apps/Day\ One/Journal.dayone/entries

find . -type f -print0 |xargs -0 grep -L “<string>”$1″</string>”| xargs grep -li “”$1″” |xargs grep -l “<key>Tags</key>”|xargs -I file /usr/libexec/PlistBuddy -c “add Tags:Key string “$1″” file

find . -type f -print0 |xargs -0 grep -L “<string>”$1″</string>”| xargs grep -li “”$1″” |xargs grep -L “<key>Tags</key>”|xargs -I file /usr/libexec/PlistBuddy -c “add Tags array” file

find . -type f -print0 |xargs -0 grep -L “<string>”$1″</string>”| xargs grep -li “”$1″” |xargs grep -l “<key>Tags</key>”|xargs -I file /usr/libexec/PlistBuddy -c “add Tags:Key string “$1″” file

Next, you’ll need another script called updatetags.sh, looks like this:

#!/bin/bash
cat /Users/andy/Dropbox/Apps/Day\ One/tags.txt|xargs -n 1 /Users/andy/tag.sh

The last bit will be a new LaunchAgent, so go to ~/Library/LaunchAgents and mock up a plist file by copying one from there, if you need an example, try this:

more ~/Library/LaunchAgents/com.andymchugh.tag.plist
<?xml version=”1.0″ encoding=”UTF-8″?>
<!DOCTYPE plist PUBLIC “-//Apple//DTD PLIST 1.0//EN”
“http://www.apple.com/DTDs/PropertyList-1.0.dtd”>
<plist version=”1.0″>
<dict>
<key>Label</key>
<string>org.andymchugh.tag</string>
<key>ProgramArguments</key>
<array>
<string>/Users/andy/updatetags.sh</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Minute</key>
<integer>00</integer>
<key>Hour</key>
<integer>06</integer>
</dict>
</dict>
</plist>

The name of the LaunchAgent has to be unique and the inside name (<string>org.andymchugh.tag</string>) should match the file name like you see here. Swap out the com bit for org, and forget the plist bit. This script will run every day at 6am. You can flavor it to your liking.

Then the final command to tie it all together:

launchctl load -w com.andymchugh.tag.plist

So now, when you write DayOne Journal entries you can mark up the tags.txt file that lives in your Dropbox. Value added, if you change this file anywhere, Dropbox will make sure it syncs up with all your other systems, so you can edit it and forget it pretty nicely as long as it’s not open-for-editing when your script fires off at 6am. That would be messy.

The first time you do it, you’ll notice your Dropbox churn for a long while and then all your other connected Dropboxes will churn as they sync up. Your iPhone and iPad will have huge downloads to do, but they’ll catch up well enough. As you create new DayOne Journal entries you can rest assured that your script will be doing keyword searching for you on your behalf and hooking up your tags to your DayOne Journal entries for you.

Just one more thing automated and out of the way. Hooray!

P.S. Backup your Journal, DIY. Be safe, be smart, learn how to use tar. man tar. Read it. Live it. tar is your delight and your savior. 🙂

EDIT: tags.sh needed a cd command first, otherwise it would just wander aimlessly. Sorry about that.

Tag Painting in Day One Journal

I’ve been really enjoying DayOne and they have recently updated their app so that the iPad, iPhone and Mac Apps can all create and manage tags. What’s been missing is a way to blast in tags based on keywords.

In this example, every time I have a journal entry with “Scott” in it, I want it to be tagged “Scott”.

Here’s how I did it:

1) Open Terminal, go to ~/Dropbox/Apps/Day One/Journal.dayone/entries

2) FOR FILES THAT DON’T HAVE TAGS, A TAG SECTION, PAINT THE SECTIONS WITH THE TAG

find . -print0 |xargs -0 grep -L “<string>Scott</string>”|xargs grep -l “Scott” |xargs grep -l “<key>Tags</key>”|xargs -I file /usr/libexec/PlistBuddy -c “add Tags:Key string ‘Scott'” file

3) FOR FILES THAT DON’T HAVE TAGS, DON’T HAVE A TAG SECTION, CREATE TAG SECTION

find . -print0 |xargs -0 grep -L “<string>Scott</string>”|xargs grep -l “Scott” |xargs grep -L “<key>Tags</key>”|xargs -I file /usr/libexec/PlistBuddy -c “add Tags array” file

4) Then go back to #2 and re-run it. Everything that has your text should be tagged with the text you choose.

Swanky! The only thing you have to watch out for here is the little l (little ell) looks a lot like a capital I (capital-eye) – might be best to copy this into a browser and set the font to Courier just to make sure before you run it, also, the last xargs does the changes, so skipping out on that might be smart. I can’t make any guarantees that it’ll work, but as far as I can tell, it works great!

YMMV. Careful.

Google Authenticator

Dial lockOver the long Fourth of July holiday weekend I received an email from WordPress.com detailing news that they were now fully compatible with the Google Authenticator Two-Factor security system. I haven’t thought of Two-Factor in a long while and decided to look into how Google had cornered the market in this particular security market.

First a little background. The term Two-Factor security means that when you want to prove who you are to some service, called authentication, you usually just have to present two pieces of information, a username and a password. This combination not only identifies who you are and proves your identity through the shared secret of the password, but allows systems to remain as open as possible to all clients who want to connect – assuming that everyone is playing by the rules and nobody is trying to be sneaky or clever. Passwords are notoriously wimpy things, most people give up on complexity because they can’t readily remember the password and it’s not convenient so they select simple passwords like “12345”, “password”, or “secret” and leave it at that. The problem with passwords is that people who make them up are either lazy or don’t care about entropy or complexity and since a lot of your work and identity is being controlled using these systems, using these simple passwords is begging for disaster. Another issue that plagues a lot of people, and goes in with how naturally lazy many of us are, is that people will use one poor password on every site they go to and keep their usernames the same as well. The risk here is that when one service is compromised, all the other services are compromised as well and it’s a huge upward climb to get out of that mess if you find yourself trapped in it.

Cleverness works both against people in general, with thieves, phishers, and hackers as well as for people in general, with things like hashapass or applications like 1Password. Hashapass is a free service that combines the web address of a service with one single complicated password to generate a hash, which is to say, a value that is easily calculated from the combination of the single complicated password and the web address but done so in a way that going backwards is very difficult to do. If any piece of the puzzle is missing, it’s technically unsolvable. As an alternative to this there is 1Password, an application that I have become very fond of, and it uses a similar approach to hashapass. In 1Password one master password unlocks a database of all the sites and their individual passwords so you don’t have to remember a constellation of passwords, all you need is to remember one very good secure password and you are all set. There are a few other nice features to 1Password that I like, being able to generate very long random passwords and store them for me allows me to establish plausible deniability when it comes to my online identities. Because 1Password randomly selected a 32-character password for Facebook, I cannot be compelled, even under torture to reveal that password to anyone else. I just don’t know it. I know 1Password, but that’s not the right question so my account remains secure.

All of this I have collected and use, and I use it everywhere. On my MacBook Pro, my iMac at work, my iPad and my iPhone. 1Password makes it very easy to manage the security database and I’m quite sure that it’s secure. In my life, any more security is rather like putting more padlocks on a firmly locked jail cell, it’s rather silly and feels a lot like overkill. Then again, more security is always better, especially if it’s really clever and somewhat convenient.

Two-Factor security adds another component to the process of authentication. It augments the username and password combination. A password is something I know (or store using 1Password) and the second factor is something called a Time-Based One Time Password (TOTP). This is where the free iPhone app called Google Authenticator comes in. The app records a secret key from a site I wish to prove my identity to in the future, for example, Google itself. I set up two-factor, request a security token for Google Authenticator and set it up in the app. The key is transmitted by QR code, which means you can quickly acquire the long complicated random (hard to type) secret key using the camera in your phone. Once this process is complete the Google Authenticator app displays a six digit number that will work to prove your identity to the site associated with that particular entry and this entry only exists for 30 seconds at a time. This six digit password exists only once in any one 30-second period and there is no way to divine this password without having the Google Authenticator application with it’s stored secret code.

Having two-factor enabled in this way means that my username and password are no longer as important as they once were. Even if my username and password are revealed or compromised without my knowledge, the secret key that I have in my Google Authenticator app remains secure with me and the 30-second-long one-time-password additions remain a secret with me. What I know may be compromised, but what I have (the Google Authenticator) most likely won’t be unless someone steals my phone and finds a way to best the security on that device before I have a chance to wipe it remotely. If in the case my Google Authenticator becomes compromised, my passwords will likely not be because they are uncrackable, and so I am still secure.

Practically how does this work? When I want to log into Google Mail using two-factor, this is what I do. I open a web browser, I type in the address “gmail.com” and press enter. Then I enter my username and my password and then in the third field under the password is a box labeled “Google Authenticator Token” and then I grab my phone, start my Google Authenticator application and then read the six-digit number from my phone and type it in. The service logs me right on and after a few seconds, that six-digit password is no longer valid and is meaningless. I’m authenticated and the system did as it was designed to do. One of the nice parts of Google Authenticator is that the entire app is a mathematical operation, it doesn’t require the network at all to generate these numbers, so this would be a good solution for people who may not have a reliable connection to the network or have a data quota on their phone.

Of course, online authentication is just the beginning. I found a way, yesterday, to embed the Google Authenticator system into my Mac OSX Mountain Lion installation so that when I want to login to my computer at work or my laptop I have to type in my username, my password, and read the six-digit code from my Google Authenticator application. The setup isn’t difficult to get it to work. You need a compiled PAM module which I have (just ask if you want a copy) and an application which you use to create the secret key on your computer. With it all set up, and a slight adjustment to a settings file, even if I were to lose security on my password at work nobody could login to my account without my username, password, and GA token.

This arrangement works quite well and I’ve set it up for my Google accounts, my WordPress.com and .org blogs, Facebook, Evernote, and Dropbox accounts as well. Everything is secure, obnoxiously secure. 🙂

photo by: MoneyBlogNewz

Drafts Changes Workflow

The more I use the Drafts app for my iPad and iPhone the more I love it and the more I want to use it. It’s actually changed the workflow for my “Post-a-Day” WordPress blogging as well as my regular blogging in general. What I used to do was copy the Post-a-Day prompt emails over to my WordPress blog and set the post type to Drafts and let them sit there. I’ve never been a huge fan of the editor built-in to WordPress, but copying the emails to Drafts and storing them there, syncing them to Simperium which then synchronizes them across all my devices that have Drafts loaded on them, which is now just my iPhone.

The app itself has so many neat features, being able to store multiple drafts and have them swipe-accessible from the left makes switching files a breeze and then when the post is done and ready to be published I can swipe from the right and select as many services as I want to send my drafts off to. It’s the perfect promontory to launch Day One, Facebook, Twitter, Tumblr, and WordPress. Generally speaking, the drafts themselves almost always follow a certain path, first to Day One then to WordPress because then WordPress sends links to Twitter, Facebook, and Tumblr on my behalf with the publicize feature. But sometimes I write things that don’t go to my blog, in that case I can send to Day One and Facebook. I have configured the apps representation in Facebook to conform to my “Sharing” security group, so even if I tap the Facebook option I don’t have to worry about my private sharing thoughts leaking out where they don’t belong.

The only thing (yes, there is one of these for every user) that I would really love is a Drafts app for Mac OSX. That would let me hack away on Drafts entries on my iMac without having to clear off workplace desktop space to set up my iPad. I think it’ll just be a matter of time before we see those options start to become available. I would pay $15 for an app like that without even batting an eye.

Cloze

Discovered a neat new site and I sent invites out to everyone who I thought initially might find it useful. The site is called Cloze and it combines email and social networking in one view. There are free apps for iPhone and iPad as well. So if you got some email from me and you weren’t expecting it, now you know who it was from. I had to use my work email because many of the addressees on the mail were work contacts and they wouldn’t know who I am if I used my gmail account.