Curl your IP Address from Mac Terminal command

Great little one liner for terminal to fetch your ip address quickly.


Will output something like the following:

D-Hewards-MacBook-Pro:http dheward$ curl

Taking it a step further.

D-Hewards-MacBook-Pro:~ dheward$ mate ~/.bash_profile

Copy this line in

alias myip="curl"

Open a new terminal window and type myip

And wollah! A nice tidy little response.

Screen Shot 2012 11 06 at 10.38.27 Curl your IP Address from Mac Terminal command

Screenshot of get my ip bash alias

Mysqldump from AWS RDS database

It’s really no different than any other normal dump. I suggest running it from your EC2 instance or another remote server, to skip out any latency found in your local connection (unless you have a decent connection unlike the most of us in the UK).

In which case SSH into either the EC2 instance or another remote server which has been granted access to the AWS RDS instance using either the EC2 Security Group or a CIDR/IP address or range.

You’ll obviously need to make sure mysqldump is installed on your remote server (should be in most cases).

Once you’ve satisfied the above, simply run the following:

mysqldump -u username -p --host hostname_of_rds_endpoint your_database_table_name | gzip > my_rds_save_file.sql.gze