krypted.com

Tiny Deathstars of Foulness

Emacs (not eMacs) is an open source project, bundled with every version of OS X. And it can’t be altered. I wrote about the Cookies recipe that Richard Stallman bundled with Emacs long ago. He also has some somewhat sexist dating tips and a bunch of other weird rantings that he bundled in there. But perhaps the best contribution is the games that Emacs comes with. These include doctor, dunnet (which would have been a great MMPORG), pong, snake, solitaire, tetris and the ever-so-popular gomoku.

These games are located in the /usr/share/emacs/22.1/lisp/play directory. But you don’t access the games directly. Instead, you use the emacs command. To get started, fire up Terminal, then run the emacs command:

emacs

At the “Welcome to GNU Emacs” screen (see below), you’re going to need to be very specific about the keys you use. Hit the Escape key.
Screen Shot 2015-08-18 at 8.25.54 AM
At the screen with the red text (see below), hit the x key.

Screen Shot 2015-08-18 at 8.28.37 AM

At the M-x prompt, type the name of the game I listed above that you’d like to play.

Screen Shot 2015-08-18 at 8.29.15 AM

Here, we’ll type snake.

Screen Shot 2015-08-18 at 8.30.11 AM

Press the Enter key and then you will be in the game.

Screen Shot 2015-08-18 at 8.32.38 AM

When it’s over, hit escape, then x and then type the name of the next game if you’d like to, such as tetris.

Screen Shot 2015-08-18 at 8.35.53 AM

August 20th, 2015

Posted In: Mac OS X

Tags: , , , , , , , ,

2 Comments

Recently, I had a bit of a problem with some code I was sending back and forth through Messages. This was caused by smart quotes, which replace single and double quotation marks with directional quotation marks. This can cause a lot of problems. To disable smart quotes:

defaults write com.apple.messageshelper.MessageController SOInputLineSettings -dict-add "automaticQuoteSubstitutionEnabled" -bool false

August 16th, 2015

Posted In: Mac OS X, Mac OS X Server, Mac Security, Mass Deployment

Tags: , , , , ,

Leave a Comment

We tend to use a lot of commands in the Terminal app. That is, after all, what it’s there fore. And there’s a nice history of what we do. There are also a number of ways to view and manage the bash history. The simplest of which is the history command, which will show the previous commands run. Here, we’ll simply run it:

history

Keep in mind that this shows the history based on context, so if you sudo bash, you’ll potentially see a different history. You can also use the bash built-in fc command, which has the additional awesomeness of being able to edit and re-run commands from the history. To start, we’ll simply look at showing the last 16 commands using the -l option:

fc -l

You can also constraint entries in the output by specific line numbers. For example, to see lines 12 through 18, simply use them as the first two positions of the command after fc:

fc 12 18

You can load the history into an editor and remove or add entries using fc without any options:

fc

To exit the editor, hit control-z. I’ve written in the past about using substitution. For example, sudo !! to run the last command. fc can do some basic substitution as well. For example, use the -s to start substation and then enter a string, which will append whatever you like before a command. So the following would put sudo in front and re-run the previous command:

fc -s sudo

And let’s say that you were doing a find for a string of krypted. To then swap that string with charles:

fc -s krypted=charles

Overall, the bash history can be incredibly useful. I frequently pipe the output of a series of lines into a new file with a .sh at the end as a starting point for scripts and use these substitution options to save myself a bunch of time not retyping longer commands. Enjoy.

August 14th, 2015

Posted In: Mac OS X, Mac OS X Server, Mac Security, Mass Deployment, Ubuntu, Unix

Tags: , , , , , , , ,

Leave a Comment

Apple Configurator is a great tool to manage iOS devices. It’s also a pretty decent tool when you need to create profiles for use on Macs. Apple Configurator is easily installed using the Mac App Store. This involves 3 workflows:

  1. Prepare: Setup a device initially.
  2. Supervise: Manage a device using Apple Configurator long-term.
  3. Assign: Manage content on devices using Apple Configurator.

However you plan on using Apple Configurator, the first step to use the product is to download it for free and install it on an OS X computer. To install Apple Configurator, first open the App Store and search for Apple Configurator.

Screen Shot 2015-07-27 at 2.46.26 PM

When listed, click on Apple Configurator.

Screen Shot 2015-07-27 at 2.47.28 PM

Then click on Get, then click on Install App. If prompted for your Apple ID, provide it.

Screen Shot 2015-07-27 at 2.52.00 PM

This downloads Apple Configurator to the /Applications directory on your computer. Once installed, open Apple Configurator and click on Prepare to get started with the product. I’ve done a series of articles at http://krypted.com/guides/apple-configurator/ to help guide you through the process of getting comfortable with Apple Configurator.

August 12th, 2015

Posted In: Apple Configurator

Tags: , , , , , , ,

Leave a Comment

Little article I/Bushel contributed to from Tech Republic covering considerations for small businesses looking to move to the Apple platform. It’s available at http://www.techrepublic.com/article/5-considerations-for-smbs-that-want-to-move-to-apple/#ftag=RSS56d97e7.

Screen Shot 2015-08-10 at 3.01.19 PM

August 9th, 2015

Posted In: Articles and Books, Interviewing, iPhone, Mac OS X, Mac OS X Server, Mac Security, Mass Deployment

Tags: , , , , ,

Safari has a bookmarks bar. Some people want to hide it. A lot of people used to do stuff like this by modifying the default user template in OS X. Not something we’ll be doing much in the future. So to do so with a script:

defaults write com.apple.Safari ShowFavoritesBar -bool false

To turn it back on:

defaults write com.apple.Safari ShowFavoritesBar -bool true

July 31st, 2015

Posted In: Mac OS X, Mac OS X Server, Mac Security, Mass Deployment

Tags: , , , , ,

I mess computers up a lot. And that means I have to reload operating systems a lot. I’ve also been having terrible issues caused by autocorrect. So… Let’s disable it. By sending the NSAutomaticSpellingCorrectionEnabled key as a false boolean into NSGlobalDomain:

defaults write NSGlobalDomain NSAutomaticSpellingCorrectionEnabled -bool false

July 27th, 2015

Posted In: Mac OS X, Mac OS X Server, Mac Security

Tags: , , , , ,

By default in OS X, when you change an extension for a file, you get a warning. This is somewhat annoying to me, as I do this pretty frequently and have never almost accidentally done so. So to disable, send a FXEnable ExtensionChangeWarning key into com.apple.finder as false:

defaults write com.apple.finder FXEnableExtensionChangeWarning -bool false

To then undo, simply run with a true key:

defaults write com.apple.finder FXEnableExtensionChangeWarning -bool true

July 22nd, 2015

Posted In: Mac OS X, Mac OS X Server, Mac Security

Tags: , , , ,

As of OS X 10.9 (and in many cases more importantly in OS X Server for 10.9 and higher), OS X now performs ARP cache validation when trying to pass traffic over a router. If you are double NAT’d/use redundant gateways then the traffic can be interpreted as network redirection and cause some pretty bad packet loss/latency. You can disable this feature by turning off net.link.ether.net.arp_unicast_lim using sysctl:

sysctl -w net.link.ether.inet.arp_unicast_lim=0

That will only disable unicast arp validation until the next reboot. If it fixes a latency problem you’re having then you can go ahead and make it permanent by adding the following line into /etc/sysctl.conf:

net.link.ether.inet.arp_unicast_lim=0

If you’re still having issues with latency, you should turn it back on. To enable it again, repeat, swapping the 0 with a 1.

July 19th, 2015

Posted In: Mac OS X, Mac OS X Server, Mac Security, Mass Deployment

Tags: , , , , , , ,

For a long time, we used the bless command to startup systems to a specific volume in OS X. Back in 2009 I started using the systemsetup command for more and more tasks. These days, I’m being guided to replace all of my bless options in scripts to systemsetup. The easy way to configure your startup volumes using systemsetup is to list the available volumes, set one as the startup volume and then check to see which one is the current volume. The first task is to list the available startup volumes, using the -liststartupdisks option:

sudo systemsetup -liststartupdisks

You can then set the disk as one that was listed by the above command:

sudo systemsetup -setstartupdisk /Volumes/HAVOKMELTDOWN

You can finally check the current startup disk as a sanity check in your script to verify the desired disk is the startup volume using -getstartupdisk

sudo systemsetup -getstartupdisk

July 15th, 2015

Posted In: Mac OS X, Mac OS X Server, Mac Security, Mass Deployment

Tags: , , , , , , ,

Next Page »