UsingMac.com

Mac Tricks and Tips, Wallpapers and Applications for Mac Users

Emacs. Bizarre Findings

Contribution of Josh Sand

I have been digging around in /usr/share/emacs/22.1/etc/ recently, and I have found it is chock full of goodies, and possibly worth of an article on UsingMac.

Files I have found (put line in Terminal):

Read More Leave a Comment (8)

Twiddle with Terminal Command Prompt

The tendency to use Terminal seems obvious to most Mac users. Unlike many others, today we are going to go through some fun stuffs with Mac Unix Command, with the way we use Terminal.

Read More Leave a Comment (25)

Terminal Kills Process

Besides using Force Quit Applications to kill crashing or freezing applications, Mac users can also use Terminal to kill these persistent processes.

Like execution of End Process Tree in Windows Task Manager, using Terminal command to kill running process leads to the same effect (but in Terminal way).

Waste no more time, let's begin the assassination.

Read More Leave a Comment (11)

Fun with Terminal

Indeed, there are many easter eggs inside your Terminal, but I believe these Terminal command lines will make you smile as it's really fun to play around with. And for some, I am sure you've never seen them before.

Birth Token

cat /usr/share/misc/birthtoken | grep [month]

This Terminal command line will show you what is the birth flower and birth stone for the given birth month, instantly.

$cat /usr/share/misc/birthtoken | grep Jan
January:Garnet:Carnation

Meaning of Flowers

cat /usr/share/misc/flowers | grep -i [flower-name]

Do you know that Camelia means reflected loveliness? Terminal knows it.

$cat /usr/share/misc/flowers | grep -i Clover
Clover:Be mine.

Read More Leave a Comment (8)

Terminal, Ruby and Quote of the Day

Maybe you're curious about the title. Let me explain it in a brief and short way: with Ruby already installed on Mac, you can install a ruby script to grab Quote of the Day into your Terminal.

Perhaps it sounds difficult for you, but actually it's really easy. Everyone can definitely do it.
Here are the steps:

Read More Leave a Comment (9)

Screen Capture a Window

We all know that by using Shift Command 3 we can take the capture the whole screen and using Shift Command 4 we can select the region to be screen captured.

Capturing Screen Window

There is a hidden trick behind screen capture, if you're pressing Shift Command 4+Spacebar, you will be able to capture a window hovered by your mouse along with the shadow.

You can also capture your menu bar, Dock and even additional menu extras of your Mac. I think you should try it. It's fun.

Screen Capture

Read More Leave a Comment (3)

Play Emacs Games on Mac OS X

What's Emacs

Unlike what people think of and write of, Terminal game isn't the correct term to be used; Instead, emacs game is the correct term.

Emacs version 22.1 first supports Mac OS X on June 2, 2007. The complete story of emacs can be read from wikipedia: GNU Emacs, if you're interested.

How to Play Game with Emacs

  1. Open Terminal
  2. Execute command emacs
  3. Under emacs, type keystrokes Escape X
  4. Insert the game you want to play. There are several interesting games you can play here, such as: Tetris, Dunnet and Gomoku
  5. Later I will tell you where to find the listing. Now, let's watch emacs in action

Read More Leave a Comment (8)

Add Welcome Message to Your Mac [Terminal]

In your Mac login window, you can add a welcome message right below the Apple and System Status. You only need to perform this following command line:

sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText "Hi, I am Mac"

Characters inside double quote will be displayed as your welcome message. I know you will try this and I also know that you will want to delete it as soon as you've finished trying. So, here is the command line to delete your Mac welcome message:

sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText ""

Someday, you can consider putting your username and password as the welcome message. No one will know, except me, you and other readers of UsingMac.com.

Read More Leave a Comment (3)

Delete Files without Going to Trash Folder

Warning: The deleted files are not recoverable.

This is just a simple and quick UNIX tip to delete files without going to trash folder first. What are the steps?

Delete Normal Files

  1. Open Terminal.app
  2. Type rm -rf
  3. Highlight files/folders you want to delete
  4. Drop them all to Terminal
  5. Execute it (pressing Return)

Read More Leave a Comment (7)

5 Most Useful Terminal Command Utilities

Until now, I've already collected and posted around 60 Terminal commands that can be used to tweak your Mac preferences; There are :

  1. Leopard Tweaking - Terminal Codes
  2. Leopard - Terminal Commands for Desktop
  3. Leopard Tweaking - Another Terminal Commands
  4. Change Terminal Focus with Mouse Over

Those are quite difficult to remember. But these next 5 Terminal command utilities must be easy to remember:

Read More Leave a Comment (8)

Change Terminal Focus with Mouse Over

Activate

Searching around the web, I got this nice feature for your Terminal: you can change focus between Terminal windows with simple mouse over window. Here is the command line :

defaults write com.apple.terminal FocusFollowsMouse -string YES

Of course, big screen Mac user has the advantage here because this feature only move the focus without moving active Terminal window.

Read More Leave a Comment (0)

Developing Rails Application on Mac OS X Leopard

With Ruby on Rails you can build powerful and dynamic web sites. Read this article to learn how to develop your application using Xcode 3.0 and the tools that come pre-installed in Leopard.

Ruby on Rails is a popular and powerful open source web framework for rapidly creating high-quality web applications. Rails is thriving on Mac OS X, and Leopard comes pre-installed with Ruby, Rails, Mongrel, Capistrano, Subversion, and other tools that help to streamline the development and deployment of Rails applications. We will use the Organizer feature of XCode 3.0 to demo the step of the development.

This article gives you a full tour of Ruby on Rails 2.0 on Mac OS X Leopard and building a web application using the latest Rails features with Xcode 3.0.

Read More Leave a Comment (4)

Leopard Tweaking - Another Terminal Commands

I've written several entries of Terminal commands. I collected all of them inside tags named Terminal; Feel free to look at them. Since I've got brand new Terminal commands inside my collection, I would like to share inside this article.

Desktop : Login Picture

Set Login Picture

defaults write /Library/Preferences/com.apple.loginwindow DesktopPicture "/System/Library/CoreServices/Finder.app/Contents/Resources/vortex.png"

I use vortex.png for this sample command lines.

Read More Leave a Comment (17)

Web Inspector for Safari

Inspector Ready to Use


defaults write com.apple.Safari WebKitDeveloperExtras -bool true

Lucky for developers, with single line of command as shown above run from Terminal, Web Inspector that can scan through web pages, like Firebug in Firefox, will be ready to use.

Many things you can inspect with this tool, from the most common stylesheets up to the time used by Network to retrieve the data. As you can see on image below.

Read More Leave a Comment (2)

Leopard - Terminal Commands for Desktop

Make Screen Saver as Desktop Background

/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background &

Read More Leave a Comment (24)