Rather than use Cicso’s AnyConnect (which has given me trouble in the past) I have setup Openconnect for VPN access.
Here is a high level set of steps to install and configure it for your use. As always, proceed at your own risk, make a backup, complete your last will and testament, and accept that your computer may overheat and fuse into a worthless pile of slag as a result of following these directions.
##Installs You’ll need openconnect and vpnc-script.
I used Homebrew to install openconnect.
$ brew install openconnectThe caveats for openconnect warn you that you’ll need the TUN/TAP kernel extensions. Get TUN/TAP from http://tuntaposx.sourceforge.net/download.html. After running the installer, run
$ cd /Library/Extensions
$ sudo kextload -v tun.kextDownload vpnc-script. I saved mine to /usr/local/bin/vpnc-script. Make sure the script is executable.
$ chmod +x /usr/local/bin/vpnc-script##Configuration You can view the openconnect command options by running
$ sudo openconnectRather than enter the options each time you want to create a virtual private network, create an openconnect configuration file and put the configuration values you need there.
$ cd ~
$ touch .openconnect
$ vim .openconnectHere is my .openconnect file:
authgroup=*****VPN
user=****
no-cert-check
script=/usr/local/sbin/vpnc
background
passwd-on-stdinFill in your own authgroup and user information.
There is no configuration necessary for vpnc-script.
##Running openconnect With a configuration file in place, here’s how to start a VPN:
$ sudo openconnect --config ~/.openconnect https://your.vpn.urlIf you don’t want to have to enter your local account password for the sudo command, you can add an exception for the openconnect command to /etc/sudoers, like so:
$ sudo visudo -f /etc/sudoersAnd add this line to the file:
%admin ALL=(ALL) NOPASSWD: /usr/local/bin/openconnectFinally, create an alias for the openconnect command above to make life easier.
Seven years ago I lost 57 pounds using a spreadsheet. This year my goal is to lose more weight using a variety of iOS apps on my iPhone.
In a nutshell I am hacking my eating and exercise lifestyle. I am watching what I eat in an effort to eat less. And I am tracking what I do in an effort to exercise more. So far I’ve lost 15 pounds at an average of just under 4 pounds a month.
Seven years ago I used an Excel spreadsheet to record everything I ate. I’d look up the calories on the Internet and record them. I also tracked, using a 5-day running average, my weight.
This time around I’m using LoseIt!, WeightBot, Moves, and a FitBit Flex.
##LoseIt! LoseIt is at heart a calorie counter. It allows me to quickly and easily record the foods I eat and gives me a budget of calories for each day. I can also enter exercises or activities, lawn mowing for example, so that I can see at a glance whether I am ahead or behind on calories for the day.
The LoseIt database is large and includes nutrition information for many brand foods and restaurants. One of its best features is the ability to scan a UPC code and look up food item. It also remembers previous meals so you can quickly re-use something you recently had. I tend to eat the same thing for breakfast every day and rather than have to enter milk, cereal, and orange juice, I can just select the meal from the previous day.
LoseIt is free and there is a premium version if you want more features.
##WeightBot WeightBot is a simple weight tracking app. You can quickly and easily record your weight. It also has some very nice graphs allowing you to see your weight trends. I entered in a goal weight and date and each day I can see where I am on reaching that goal at a glance.
The app is very nicely put together and is well worth the $1.99 price.
##Moves Moves is a free app that uses the accelerometer and GPS features of your phone to track your movements throughout the day. As long as you keep your phone in your pocket you’ll get a pretty good approximation of how many steps you’ve taken in a day. Moves uses the iOS notification system to send you a morning summary of yesterday’s activity meaning you don’t ever have to open the app. Just install it and go.
Since it uses the location feature of the phone it does drain the battery. They claim that when the phone isn’t moving that battery drain doesn’t occur, but I have to charge my phone in the later afternoon or early evening. Otherwise by 9 pm (after being up for 14 hours) the phone will be under 20% charge remaining.
I think Moves is reasonable accurate and over time it lets you see what your average activity is in a very general way. Think of it as a free version of a FitBit.
##FitBit Flex The latest addition to my arsenal of weight/exercise toys and apps is a FitBit Flex. This is an activity monitor that you wear 24x7. It monitors your activity and sleep patterns.
I’ve only had mine for a couple of months and it has already proved to be very interesting. There is a companion iOS app that allows me to see at a glance how many steps I’ve taken or how many “very active” minutes I’ve had that day.
You can set goals for steps taken and the iOS app then cheers you on through notifications. I haven’t changed the default 5 miles or 10,000 steps goal. Most days I’m in the 8500 - 9500 step range, with an occasional 14000 step day just to throw the curve off.
It is interesting to see the sleep patterns it records, with information like time to fall asleep, number of times awake, and actual time asleep versus time in bed. My wife has a Flex too and here sleep patterns are different than mine. Rarely does one person being awake disturb the other.
##Using Technology to Lose Weight None of these apps nor the FitBit Flex will by themselves help you lose weight. All they can do is give you an awareness of what you are eating and what you are doing on a regular basis. When I used the spreadsheet in 2006 to lose weight I was shocked at first to discover the amount of snacking I was doing and at how costly (in terms of calories) those snacks were. I was able to eliminate 1000 calories a day from my diet without really working at it. As a consequence I was losing 2 pounds a week for a while.
This time around I am fine tuning my eating and increasing my exercise. The weight loss isn’t as dramatic but I am very pleased with the improved lifestyle my refocused awareness is producing. That the apps are fun to use and interact with only makes it easier to accomplish.
I do not believe in diets. To my mind a diet is an aberration of your normal lifestyle. You make a temporary change which does in fact alter your weight but when you end the aberration the weight returns. What I did seven years ago was change my lifestyle to eliminate snacks and to increase my activity. This year I am once again altering my lifestyle. We bought a treadmill last winter and I am walking on it at least 5 times a week. I’ve covered over 200 miles in the past 3 months.
My ultimate goal is to have a healthy, active lifestyle. If that happens to produce a lower weight that I can maintain without effort all the better.
TwelveSouth’s SurfacePad for iPhone 5 and 4/4S is once again available after nearly five months unavailability. I have been fortunate enough to be beta-testing the iPhone 5 version since early June.
##Fit, Finish, and Color It is perfectly sized for my iPhone 5. I had to apply it twice to get the edges aligned with the edges of the iPhone. However, it is easy to remove and realign so this isn’t a problem. I also had to fit the iPhone 4S SurfacePad twice when I installed it.
The back color of the black iPhone 4S was (if I remember correctly) uniformly black from top to bottom. The iPhone 5 has a black band across the top 10th and bottom 10th of the back. The middle 80% is slate colored. The remove for the camera lens, flash LED, and video microphone, in the folio is large enough to expose a bit of the slate color in addition to the glossier black at the top. This creates a tricolor effect: the muted black leather, the glossy black of the phone, and the muted slate of the back’s center piece. I realize that room is required around the lens and flash so as not to impede their function. Still it would be interesting to know if a smaller remove in the back cover, one that was flush with the union between the slate and glossy black (perhaps with a chamfer to keep it out of the way of the lens optics or flash) would work.
Having the slate exposed is not a deal breaker for me, but it is distinctive.
The stitching along the hinge on the back is smooth and even. On my previous SurfacePad (for the iPhone 4S) one of the stitch ends was slightly exposed and, while not sharp, was noticeable.
When closed the SurfacePad lays smoothly across the face of the phone and stays in place under its own weight. When opened the cover lays flat against the desktop.
The color (black) is even all over, and the leather is smooth and blemish free. The embossed “12” logo on the outside of the front cover is nicely understated. The interior color (gray) is also smooth and unblemished. The “SurfacePad” and “12 TwelveSouth” embossing are clear and nicely lined up with the edges of the folio. The slight chamfer around the edges of the folio’s cover is even all around, both inside and outside the cover.
The embossing for the volume up and down buttons are nicely understated. Both appear to be slightly toward the back of the case, i.e., ever so slightly off center. They do line up with the volume controls.
The hinge for holding the phone in landscape position is was a bit stiff when the case was new, but it has broken in nicely. It holds the phone at a good viewing angle.
The new leather had a wonderful aroma. Now that it has aged a bit the aroma isn’t as apparent. It lingers just at the edge of your awareness.
##Packaging The packaging is imaginative and makes for a good “out of box experience”. I especially like the cardboard iPhone 5 mock-up that the folio comes with. I also like the TwelveSouth decals that are provided. It would be ideal if the removable film on the back of the decal could say “permanent” or “removable” so that who ever apples one knows whether or not they are decorating their laptop or whatever permanently or not.
##Use and Wear With my previous SurfacePad I noticed that over a few weeks time the cover was slightly askew when closed. This, I believe, was due to my inserting the phone into my front pants pocket in the same orientation every time. When I noticed the way the cover was forming as a result of this, I started alternating how I put the phone in my pocket. One time power-switch-end first, one time power-switch-end last, sometimes face toward my leg, sometimes face outwards. After two-and-a-half months use the iPhone 5 case hasn’t produced any skewing of the cover. I usually put my phone in my pocket the same way out of habit, but when I think of it I switch the orientation around.
There are two places where the adhesive on the leather is slightly apparent. It isn’t sticky but there is a little discoloration along the edge next to the SIM-card slot and a smaller blemish along the bottom. Neither is really objectionable, they just add a little character to the folio. There are a couple of places along the cut edges of the cover that are now distressed. Again, this just adds character to the folio.
Having a hinged cover on your phone does alter how you interact with it. I religiously hold the phone in my left hand during phone calls. Consequently I fold the cover back against the rear of the phone while holding it. When I use the phone at my desk or a table I just flip the cover open so that it lays next to the phone. Using the phone with just my right hand (I’m primarily right handed) is easy. Using it with just my left hand is a tad trickier as the cover is in the way. My hands are large enough that I can pick up the phone open the cover and fold it behind single handed even on the left side.
The leather has enough grip to keep it from sliding when placed on a mildly sloped surface. I used my iPhone 5 naked for a couple of months before getting the SurfacePad and found the phone to be extremely slippery. The tactile feel of the leather is pleasing and I feel my phone is much more secure in my hand; especially when removing it from my pocket.
I use the hinged-stand quite a bit while practicing cello, as it holds the tuner/metronome app I like at the perfect viewing angle.
Taking photos or videos requires that you deal with the cover. While it is obvious that you can’t fold the cover back since it will cover the lens, it is surprising the number of times I have done just that. I rotate the phone so that the Home button is to the right to reach landscape orientation. This allows the cover to dangle out of the way. If you prefer the Home button to the left you would have to hang on to the cover in order to use the camera.
##Conclusion On the whole I am extremely pleased with my SurfacePad. I liked the original one for the 4S enough that I worked hard at getting one for my iPhone 5. It is distinctive and classy in a very understated way. It minimally protects the phone, choosing to enhance its overall appearance rather than protect it at the cost of hiding the fine machining of the phone’s exterior.
As I said at the end of my iPhone 4S SurfacePad review, it isn’t the least expensive cover you can get for your iPhone, but its quality, fit and finish enhance the phone wonderfully.
Note: I was given a beta SurfacePad to test as a result of contacting TwelveSouth.
Back in the day, when I had an 80-pound glass and steel mainframe terminal on my desk, there was only one place I had to go to change my password every month. Eventually I had access to more than one mainframe system and then I had two or three passwords, but still just one place I had to go to change them.
This afternoon I completed the bi-annual password change required by the university. The following list is all the places I needed to go to complete this one password change.
I am certainly not advocating returning to the limited technology of mainframes in the early 1980s, but there has to be a better way to manage our means of authentication than some 20 password changes in 10 locations. I’m technologically savvy. In making my list of anticipated password changes I only missed enumerating one change. How do non-technical people who have a smartphone and a table and a laptop and a desktop manage to survive this recurring chore?
Some aspects of our increasingly technological society are making life easier and better, but other aspects have only become more daunting and tedious. Hopefully there is some startup out there with a novel approach to biometric identification or password management that will remove this odious chore from our lives.
For my day job I’ve been doing a lot of work with Chef, Vagrant, and veewee. All of these tools are continually evolving and, over the course of several weeks time, I’ve updated versions more than once. As a result my set of Ruby Gems was causing some conflicts trying to run vagrant up after using veewee.
To clear things up so that I could make better use of RVM Gemsets to manage what Gems were loaded for a given process, I wanted to delete all Gems installed on my machine. A quick StackOverflow search lead me to this command:
$ [sudo] gem list --no-version | xargs [sudo] gem uninstall -aIx
While I’ve marked sudo as optional, you should use them as a pair — either have both of them in the command or neither of them.
Running this command didn’t work as expected as it ran afoul of the default gems that are pre-installed with Ruby. Another search lead me to this gem-reset Gist on GitHub.
#!/usr/bin/env ruby
# Remove all gems EXCEPT defaults :)
`gem list -d`.split(/\n\n^(?=\w)/).each do |data|
match = data.match(/(?<name>([^\s]+)) \((?<versions>.*)\)/)
name = match[:name]
versions = match[:versions].split(', ')
if match = data.match(/^.*\(([\d\.]*),? ?default\): .*$/)
next if match[1].empty? # it's the only version if this match is empty
versions.delete(match[1] || versions[0])
end
versions.each { |v| system "gem uninstall -Ix #{name} -v #{v}" }
endThis script removes all Gems except the ones marked as default. I forked it and used the wget option to run it. Once the script completed my machine only had the default gems installed.
For each of my Ruby-based projects I added a .ruby-gemset and .ruby-version file specifying the gemset name I wanted and the Ruby version desired. Next I visited each project, checked that the gemset was in use, and ran bundle install to re-install the gems, this time in managed gemsets.
This not only cleared up the gem conflict I had introduced, but has made seeing and managing my installed Gems easier.
Every so often, usually after a restart or re-boot, I would be unable to drag and drop on my MacBook Pro. For example, when moving mail to a new folder I could click on the mail and drag it to the destination but when I let released the trackpad the mail stayed “stuck” to the mouse pointer. I’d have to move the mail back to its original location and click there to release it. Moving icons had the same problem: I could drag, but not drop.
This morning, after updating to 10.8.4, the issue cropped up again and I think I’ve fixed it once and for all.
In the past I would bring up the Force Quit dialog (Option-Command-Escape) and restart the Finder. Today, however, restarting the Finder didn’t solve the problem. Some Google searched led me to several forum postings that indicated some third-party software may contribute to the issue. In my case the culprit was AirDisplay.
Avatron, the makers of AirDisplay, are aware of the problem, saying that (for my model of MacBook Pro) I should sleep and wake the computer after every restart or login. Which explains why the problem always seemed to go away eventually.
Since I don’t use AirDisplay very much, I decided to completely remove it from my system. Just deleting the preference pane from System Preferences doesn’t work as AirDisplay, and many other third-party addons, insert kernel extensions or kext files into your system. Since AirDisplay allows the use of an iPad as a secondary screen, it has need of intercepting (or at least being aware of) drag and drop operations. It seems that the kext or kexts involved were interfering with normal drag and drop operations.
Searching for “completely remove AirDisplay revealed that there is an uninstaller for it hidden in Applications/Utilities. Once I ran that (which required a reboot) drag and drop started working normally again.
tmux is a terminal multiplexer — it allows you to create a terminal session containing one or more windows, each containing one or more panes. You can have multiple sessions, and you can attach to and detach from any session, even remotely, making tmux a powerful tool, especially when you work with lots of command line tools.
My tmux usage centers around a single session that contains multiple windows, one for each current activity or project. Depending on the activity a window may have multiple panes splitting the display horizontally or vertically. Recreating my tmux session can take some time, so I figured out how to automatically reattach to an existing tmux session or create a new one anytime I start my terminal program, iTerm2.
In the preferences for iTerm2, select the ‘Profiles’ tab, and then the ‘General’ pane for your default profile. In the ‘Command’ section of the ‘General’ pane locate the ‘Send text at start:’ setting. Put this command in, substituting your session name for base.
tmux attach -t base || tmux new -s base
Now anytime you start iTerm2 (or create a new window) tmux will try to attach to a session called base, or, if that session doesn’t exist, it will create a new session called base.
In practice this means I can simply quit iTerm2, which detaches me from the current session. When I next start iTerm2 I’ll be reconnected, and all my windows and panes will be there.
In February I bought a TwelveSouth SurfacePad for my iPhone 4S. I liked it so much that I wrote a review. In late March my wife and I upgraded both our phones to the iPhone 5. The day after getting my new phone I went to the TwelveSouth Website planning on ordering an iPhone 5 SurfacePad.
After selecting the model and color I wanted, I was informed by the site that it was “currently unavailable.” I was given an option to sign up to be notified when the product was available; which I took.
Since then I have checked the TwelveSouth site daily — each time being informed that the SurfacePad was “unavailable”.
On April 18th I wrote to TwelveSouth asking what the hold up was, and asking if they had any idea when SurfacePads would be for sale again.
Dear TwelveSouth,
I purchased a SurfacePad for my iPhone 4S and loved it. The feel of the leather, the way it looked on the phone, the elegance of the whole thing. Then I upgraded to an iPhone 5. And every day for the past month I’ve checked the TwelveSouth site to see if the Jet Black SurfacePad in the iPhone 5 size is available. And every day for the past month the answer has been no.
Sad Panda.
I signed up to be notified when the SurfacePad is available again, but I am sorely disappointed that it has been weeks with no word. My poor iPhone is naked and cold and bereft of its leather jacket.
Sincerely hoping you’ll respond with a date (Today? Tomorrow?) when I can order my new SurfacePad.
I received a very nice reply saying that they were “experiencing some manufacturing delays”.
Hi Mark,
Thank you for the nice email, and especially for your previous SurfacePad for iPhone purchase!
We are experiencing some delays the manufacturing of the SurfacePad for iPhone, and because of the nature of the delays, I’m afraid we aren’t able to predict when they will be back in stock. If you would like us to notify you as soon as they’re available again, please sign up by using this link (if you haven’t already done so): https://app.e2ma.net/app2/audience/signup/1731974/1400299/?v=a
I’m so sorry for the wait, but we’re doing our best to make these available again just as quickly as we can.
If you have any further questions, please let me know.
Regards, Bridget
Twelve South Support
I continued to check the site daily until May 10th, when I again wrote to TwelveSouth asking for an update.
Good morning,
Almost two months ago I purchased a new iPhone 5 to replace my iPhone 4S. I had a SurfacePad for the iPhone 4S. It was the perfect folio-style cover for the phone.
Everyday since purchasing my new phone I’ve been to the TwelveSouth website ready to purchase a new SurfacePad for my iPhone 5. And everyday since purchasing my new phone I’ve been disappointed. Yes, I’ve signed up to be notified when availability returns, but, really, two months?
My poor phone is naked and cold and unprotected in any sense. How long does it take to grow new leather and slap your nifty stickum on it and mail it to people? :)
Any idea when this product will be available again?
Once again I was told that there were “manufacturing delays” and that the nature of the delay meant TwelveSouth was unable to predict when the product would return to availability.
Hi Mark, and thank you for your inquiry!
We are experiencing some delays the manufacturing of the SurfacePad for iPhone, and because of the nature of the delays, I’m afraid we aren’t able to predict when they will be back in stock. I’m so sorry for the wait, but we’re doing our best to make these available again just as quickly as we can.
If you have any further questions, please let me know.
Regards, Bridget
Twelve South Support
On May 20th (now two months after purchasing my iPhone 5) I looked up TwelveSouth on Twitter and tweeted the following:
Everyday I check TwelveSouth to see if the SurfacePad for iPhone 5 supply issues have been resolved. Everyday I am sad. cc: @andrewbg
Much to my surprise I received a response from @andrewbg asking what model and color I desired.
@zanshin What color/size are you looking for?
After replying with that information, he asked that I follow him and send him a direct message. Since sending the direct message on May 21st I have had no contact with TwelveSouth.
As of this evening, May 29th, the Jet Black SurfacePad for iPhone 5 is still unavailable. I’ve sent a second direct message to @andrewbg.
I’m perfectly willing to pay full price for a SurfacePad for my phone. My review of it still stands — it’s the only case I want for my phone. However, I feel like I’m building up a karmic debt by carrying my iPhone around naked. Eventually I’ll have to give in and spend my limited iPhone case dollars on some other case.
Recently I have been enjoying several recurring email newsletters. Several are weekly and a couple are monthly. Unlike a website, where I have to remember to periodically go look for fresh content, these come to me. Also, they all aggregate multiple stories around their topic into one convenient place for me.
Ray’s Monthly Newsletter
Ray Wenderlich’s newsletter is iOS centric, and is an excellent companion to his website, raywenderlich.com. Lots of tutorials and iOS centered articles.
Ruby Weekly
A weekly roundup of Ruby specific events, reading, libraries and code, tools, and some featured articles. Ruby Weekly always has something I find interesting.
iOS Dev Weekly
Dave Verwer publishes iOS Dev Weekly every Friday. It’s a well curated list of articles, tools, code, and design links all centered around iOS development.
Pycoders Weekly
Pycoders Weekly is to Python what Ruby Weekly is to Ruby. A weekly listing of news, jobs, projects, and discussions.
Devops Weekly
I’ve only recently started working in the devops area, and I find that Devops Weekly helps me to learn more about this exciting new convergence between traditional operations and development.
The Bot Cave
Published by thoughtbot, The Bot Cave contains the current state of their research, a first look at new techniques and tools. It’s published monthly.
Lincoln Loop Django Roundup
The Lincoln Loop Django Roundup is a low-traffic newsletter with links to Django content, exclusive access to blogs and screencasts, and discounts on Django learning material.
Postgres Weekly
Postges Weekly focuses on PostgreSQL articles and news.
Four years ago, in April 2009, I joined GitHub. Whenever possible I use ‘zanshin’ as my account name, however someone else had beaten me to that account on GitHub. So I used my fall-back acccount option, ‘zan5hin’.
Periodically I would visit http://github.com/zanshin to see if the account was being used. Other than an initial project that had long since gotten stale, there was no activity. Moreover, there was no profile information so I had no way to contact the erstwhile owner to see if they would be willing to relinquish the account name to me. This past weekend I sent an email to GitHub support asking for their help in contacting the owner. Here is the email I received today in response to my request:
Hi Mark,
Sure! We happily release unused usernames into the wild. I’ve reviewed this account, and deemed it dusty. I’ve made the username available to you. If you wanted to create an organization, the name will be available. It’s not reserved, though, so someone else might swoop in and take it if you hesitate too long!
You can change your username by going to Account Settings > Account Admin > Change your username.
Be aware, after you change your name, you will need to update the remotes in any local clones of your repos to point at your new repo URL. Please don’t hesitate to let us know if you have any questions or concerns.
Thanks, Sara
Needless to say I immediately changed my account name from ‘zan5hin’ to ‘zanshin’. And started the necessary changes to my remotes.
In case you ever need to change the URL for a remote here’s the command to use:
$ git remote set-url <remotename> git@github.com:<youraccountname>/<repo>
Oh, and don’t forget to change your /gitconfig to relfect your new GitHub account name.