RSS

Tag Archives: mac

ec2ssh – ssh utility Amazon forgot to include

Last week I wrote a bash script that makes connecting to AWS instances ridiculously easy. It’s called ec2ssh.

Let me show you how easy it is to use. You type ec2ssh in your shell, and a menu displays with a list of running instances. Each of your servers is numbered and grouped by security group, so it’s easy to find your instances. You can do several things here. You can type the number of the server you wish to connect to, or define a list or range of servers you wish to ssh to in a sequence.

Additionally, you can run ec2ssh with parameter, a filter, to narrow down your list of servers. Say, you run a typical environment with web, database, application servers. If your instances were tagged by meaningful names like:
– Live MySQL server A
– Live MySQL server B
– Live MySQL server C
– Live Web server A
– Live Web server B

– Live Web server XYZ

you can limit the list by specifying a meaningful parameter such as:
ec2ssh live – would list all production servers
ec2ssh mysql – would list MySQL servers in dev, staging and production
ec2ssh i-2asf3234dd – would list information for given server instance
ec2ssh sg-adf23df2d – would list all servers in a given security group

Parameters are case insensitive. To use a script, download it from the ec2ssh github page. If you’re a github user please fork the project and submit any new features or fixes.

Thanks and enjoy! Your comments are very welcome.
 
Leave a comment

Posted by on February 1, 2012 in Linux, Mac OS, Uncategorized

 

Tags: , , , , ,

Make MAMP PRO not ask about passwords on service restart

Change your default MAMP password from ‘root’ to something more useful:
/Applications/MAMP/bin/mysql4/bin/mysqladmin -u root -p password newpassword

Edit the following files:

  • /Applications/MAMP/bin/phpMyAdmin-X.X.X/config.inc.php

    $cfg['Servers'][$i]['password'] = 'newpassword'; // change root to your new password

  • /Applications/MAMP/bin/mamp/index.php

    $link = @mysql_connect(’:/Applications/MAMP/tmp/mysql/mysql.sock’, ‘root’, ‘newpassword‘);

  • /Applications/MAMP/bin/stopMysql.sh

    # /bin/sh
    /Applications/MAMP/bin/mysql4/bin/mysqladmin -u root -pnewpassword –socket=/Applications/MAMP/tmp/mysql/mysql.sock shutdown

Tip taken from this site.

 
Leave a comment

Posted by on March 20, 2009 in Mac OS, Uncategorized

 

Tags: , , , ,

Using Windows printers on Mac OS X 10.5 (Leopard)

Some Windows printers are hard to configure. Here’s how you do it:

1. Open “System Preferences”

2. Click “Print and Fax”

3. Click “+” to add a new printer.

4. Click “Advanced” from the tab options. If you don’t see it, than right-click or CTRL-click in the toolbar area (gray on top) and select “Customize Toolbar”. Drag the Advanced icon to the toolbar, click “Done” and click “Advanced”.

5. Be patient. It takes up to a minute for this screen to fill the options. Once done, select type “Windows”, device “Another device” and enter URL as:

smb://username:password@workgroup/machine/printer

My example connection is for user named “serbian” with password “cafe012”. Domain name is “Workgroup”, computer name “silver” and printer was shared by Windows as “Optra”. Fill the rest of the data as you please.

 
Leave a comment

Posted by on May 22, 2008 in Mac OS

 

Tags: , , ,

Leopard fixes

Mac OS X 10.5 Leopard is great, but as any other OS, it has it’s growing pains.

Here’s issues I encountered with it:

1. MailActOn doesn’t work with new Mail.app
UPDATE: The Leopard install has been released. Works great.

2. When starting Terminal.app I got this error message:

You are not authorized to run this application. The administrator has set your shell to an illegal value.”

I downloaded iTerm from http://iterm.sourceforge.net/ and issued a command:

sudo chsh -s /bin/bash my_username

That fixed it.

 
4 Comments

Posted by on October 28, 2007 in Mac OS, Uncategorized

 

Tags: , ,

 
%d bloggers like this: