Posts in the “apple” category

A custom TextMate command that uses ‘sed’

In this post I share the contents of a custom TextMate command I just created that uses pandoc and sed to convert markdown content in the TextMate editor to a “pretty printer” version of HTML:

#!/bin/sh

PATH=$PATH:/usr/local/bin

# note: 'sed -E' gives you the advanced regex's

# use pandoc to convert from markdown to html,
# then use sed to clean up the resulting html
pandoc -f markdown -t html |\
sed -Ee "/<p|<h2|<h3|<h4|<aside|<div|<ul|<ol/i\\
\\"

You can try to use a command like tidy to clean the HTML, but the version of tidy I have does not know about HTML5 tags. The TextMate Markdown plugin also doesn’t work the way I want it. Besides that, I’m trying to learn more about writing TextMate commands anyway.

As an important note, when you set this up as a TextMate command and then run it, it will convert the TextMate editor contents from markdown to HTML.

(In a related note, serenity.de is also a good resource for TextMate command and bundle documentation.)

In summary, this code shows:

* How to execute a Unix shell command from TextMate
* Specifically, how to execute a sed command from TextMate
* How to use modern regular expressions with sed (the -E option)
* How to search for multiple regex search patterns with sed

Apple’s Terms: We may slow down your old iPhone

So on page 51 of Apple’s iPhone Terms and Conditions it clearly states, “We may slow down your iPhone to increase the sales of new iPhones.”

(It may say that, who knows. Having just updated iOS, I wouldn’t mind if they get sued over the ridiculous length of that doc.)

Apple’s pride, and resulting lawsuits

Apple is getting sued — and rightfully so — for intentionally slowing down iPhones with older batteries. The ironic things are a) if they let people easily change the batteries, or b) made this a software setting, people would be happy with them. Their own pride (ego) created this problem.

Jonathan Ive focused on design, again

As I’ve written about before, I assumed that Apple’s Jonathan Ive had his hands full with the completion of the design of Apple Park, and that was affecting the design and quality of Apple’s recent product offerings. This quote comes from bloomberg.com: “With the completion of Apple Park, Apple’s design leaders and teams are again reporting directly to Jony Ive, who remains focused purely on design,” Amy Bessette, a company spokeswoman, said Friday in a statement.

Apple design secret: Workplace, attitude, and productivity

Summary: An Apple design secret - the connection between attitude and productivity.

Unfortunately you need a subscription to read the content over at technologyreview.com, but they had a nice article a while ago on "The Secret of Apple Design." I really like a quote they had about a person's attitude, and the relationship of that attitude and the impact on their work:

Walmart deploying Mac computers to save money

Multiple sources, including AppleInsider.com, are reporting that Walmart plans to deploy 100,000 Mac computers to save on employee PC costs. From that article: “IBM noted that PC users drive twice the number of support calls compared to Mac users, and that PC support tickets require desk side support by IT personnel five times as often. The company's own analysis showed that each Mac deployed saves the company $270 in support costs compared to a Windows PC.”

The slow death of the iPhone 5s

Back in April when I was 2,000 miles from home, my iPhone began crashing and I had to learn the “hard reboot” technique. Then right before my surgery last month it quit working for cell calls, and I learned more iPhone restoration techniques. After that, the Bluetooth failed. I bought a cheap Moto E so I could make calls.

Over the weekend I dropped a phone for the first time in my life, and I ended up with some iPhone 5s Gorilla Glass in my fingers. But still, it works for music and messages.

Changing iPhone ring length

iPhone ring length FAQ: Can I change the iPhone ring length, or number of rings? My iPhone doesn't ring long enough, and often goes to voicemail before I can get to it.

After digging into this, yes, it looks like you can change your iPhone ring length, and there are at least two ways to do this.

Changing iPhone ring length - Option 1 (The safe way)

First, the safest option is to call AT&T customer service, or visit an AT&T store, and they can do it for you.

Great tablet stand

If you like to watch movies and videos on your tablet, this tablet stand is very cool. The up-and-down rotation is nice and stiff, so you can set it at any angle, and it has rubber cushions in the right places to keep your tablet from sliding or getting damaged. I just bought this a few days ago, and it’s a definite “thumbs up.” It works great with my Nexus 9, and an old iPad 2 (that I only use for music these days).

(I show it next to an apple because the shiny images on Amazon may give you the impression that it’s larger.)