Showing posts with label Macbook. Show all posts
Showing posts with label Macbook. Show all posts

Friday 5 February 2016

Stealth mode in Mac OS X

In Mac OS X, you can enable Stealth mode so that ping requests to your IP address are unreachable.

Go to System preferences -> Security & Privacy -> Firewall -> Firewall Options

Tick the Stealth mode options as shown below:


Now if you try to ping your Mac's IP address from another machine, you'll get the Request Timeout error with the stealth mode enabled.

Wednesday 3 February 2016

Basic print examples in Unix using Sed

I was long thinking to write a short tutorial on covering some basic Sed examples for easy and quick reference. So here we are. In this short post I'll try to include some basic print examples with some variety... the more the merrier right?

The sample Testfile.txt we'll be using in this example is as below :

1.Here is a cute little tutorial for
2.trying out printing things using
3.the Stream Editor or Sed in Unix.
4.The author of this tutorial is
5.none other than IroncladWriter
6.himself. The tutorial aims to
7.teach folks and educate how
8.they could unlock the power
9.of Unix to the fullest. Am posting
10.this on the blog IronCladZone
11.The best blog on the whole of
12.internet, where you can learn
13.technical stuff as well enjoy 
14.entertaining tidbits like movies,
15.music, television, fashion, food,
16.shopping, travel, trends etc.
17.Just sit back, relax and

18.ENJOY THE RIDE :)

* Print only the first line of a file

sed -n '1p' Testfile.txt

OR you could also use the following:

sed q Testfile.txt

* Print only the last line of a file

sed -n '$p' Testfile.txt

* Print only the lines between 8th and 11th line of a file

sed -n '8,11p' Testfile.txt

* Print only those lines having the word "Unix" from the file

sed -n '/Unix/'p Testfile.txt

* Print only those lines after the word/pattern "shopping" to the end of the file. Note this will include the line containing the word "shopping" as well.

sed -n '/shopping/,$p' Testfile.txt

In my next post, I'll try to cover some advanced printing examples using Sed. Stay tuned fellas.

Tuesday 2 February 2016

Hidden Screenshot Tricks on Mac OS X

Here's a quick guide to the keyboard shortcuts for taking screenshots on Mac OS X.
  • For capturing the entire screen press Command+Shift+3.
  • For capturing only the current active window press Command+Shift+4 and then the space bar and Return.
  • For capturing a specific limited region from the screen press Command+Shift+4 and choose the area by dragging the crosshairs.
Now here'a a small compilation of the hidden tricks of screenshots :
-----------------------
By default the screenshots are saved as a .png file on the desktop. For changing the default save location do the following.
Open Terminal and type the following for example :

defaults write com.apple.screencapture location /Users/IronCladWriter/Pictures

Make sure to replace the location path as desired.
-----------------------
If you want to change the image type from default .png to say .jpg, simply type the following :

defaults write com.apple.screencapture type jpg
-----------------------
To apply the above changes type in Terminal :

killall SystemUIServer
-----------------------

Alternatively you could fire up the Grab application, as seen in Other Utilities


Saturday 10 May 2014

Lock Screen in Mac OS X

Here's a quick tip for the month of May - Q) How to lock screen of Mac OS X?

Answer : Control + Shift + Eject button

Correct me if am wrong, the Windows equivalent to lock screen is Windows button + L  right

Tuesday 1 April 2014

Validate Fonts on Mac OS X

Occasionally or infact very rarely, fonts might get corrupt on Mac OS X. Mac OS X offers the option to validate the authenticity of fonts so that they are safe to use.

Open Fontbook

Click "All Fonts" from the Collection bar on left. Now select and highlight all the installed fonts using shift key (from top to bottom).

From the File menu -> choose Validate Fonts

You'll see the results of the output, something like below. This is a useful procedure to check the font authenticity, if you download & install some third party fonts from the Internet. Just an extra step of caution to make sure that nothing is corrupted. Hope it helps. Ciao.


Sunday 2 March 2014

How to Wrap & Tie Macbook Pro Charger Cord

I've seen a lot of naive & experienced Macbook Pro & Air users struggle with tying and wrapping the Magsafe power adapter cord. This is a quick tutorial on how to wrap it the right way in order to carry it in the backpack with ease.

Apple has really put a lot of thought into the charger's wire management. The charger happens to be the most portable one among all laptop chargers. Good job, Apple. So, here are the steps.

Step 1 : Raise the 2 side hooks of the square box of the battery charger.

Step 2 : First take the thick wire side and roll it vertically around the square box. Don't stretch it too much on the first roll.

Step 3 : Now hold the rolled thick wire with your left hand so that it doesn't unwind. With your right hand, take the thin wire side (the side which you connect to the laptop). Roll this thin wire horizontally around the 2 raised hooks of the box. Make sure you don't stretch the thin wire. Just tie it around naturally, without stressing it out. The thin wire side is the most susceptible to wear and tear. So, make sure you don't put pressure on the thin side, so that it lasts longer.

The thin wire which is horizontally wound helps keep the vertically wound thick wire in check.

Take a look at the picture for reference.




Oh and just in case you need a new Magsafe power adapter, check Apple store which sells it USD 79 & Amazon which sells it for USD 73.99. You have a good day, guys. Ciao for now. 

Thursday 27 February 2014

Tomcat Controller for Mac OS X

Folks, if you've installed Apache Tomcat on your Mac OS X machines for deploying webapps, this post will surely interest you. This quick byte is about a free small useful utility - Tomcat Controller, used for starting and stopping Apache Tomcat with a single mouse click.

Once downloaded, install it. Observe that it will add a new PrefPane in the System Preferences. It supports the newer 64-bit machines and older 32-bit machines as well. However, on newer 64-bit machines, am wondering why it closes and reopens the 32-bit System Preferences. Guys, do drop in your comments if you're aware of the reasons why it happens this way.


You simply have to mention the location pointing to the Tomcat instance. The current version 2.1 works like a charm for Tomcat 6 & 7 alike. Just click Start Tomcat Server. This comes in very handy if you have to bounce the server over and over again.


Finally, if you need some help with installing Tomcat & accessing the Tomcat manager, do refer my previous post. Bye.

Sunday 23 February 2014

Disable Google Chrome Notifications on Mac OS X

All Mac OS X users using Google Chrome browser might have recently noticed a new Google Notification icon ( a grey bell ) on the OSX menu bar.

You'll quickly notice that it's settings menu does not provide any intuitive way to exit or disable it.

In order to disable it, do the following :

Open Google Chrome browser.

In address bar, type chrome://flags

Now search for the option "Enable Rich Notifications" and change "Default" to "Disabled" from its drop down menu. Hope it helps.


Wednesday 12 February 2014

Oracle Weblogic 12c Installation Guide on Mac OSX

This post will walk you through the installation of Oracle Weblogic Application Server 12c on a Mac OSX machine.

First of all, visit the official Oracle Weblogic download page and download the latest generic version. You would need to create a Oracle ID first. Accept the agreement and start the download. In this example, we would download the Weblogic v12.1.2. The filename in this case is wls_121200.jar

Also, note that the generic version does not come with JVM / JDK for its installation. So make sure, you have Java installed on your machine.

Once downloaded, note the following steps :

Run the following command to initiate the installer

java -d64 -Dspace.detection=true -Xmx1024m -jar wls_121200.jar

This will start the extraction of the wls_121200.jar and also perform some routine system pre-requisite checks. Note the arguments that we passed. The space.detection parameter is set to true to detect available space. Also, the max memory usage size by JVM is set to 1024m i.e 1 GB.


Now, you'll the following installer GUI screens.



In the next screen, you'll see the option to modify or change location of Oracle_Home directory. Leave it to default option if you don't want to modify the location. Click Next.


In the following screen, you have to choose the type of installation. Choose the default option. However, choosing the Complete Installation will also install OPatch and some examples like medrec. 


In next screen, you can see the overall Installation summary. Save the response file if you intend to perform silent installations in the future. Check this link for reference. Click Next.


This will start the installation process. This will take a few minutes. You can observe the overall progress here.



Once the installation is completed, you'll see the following screen. Click Finish. This will initiate the next step - Configuration Wizard.


Below is the welcome screen of the Wizard.


Following is the first screen of the Configuration Wizard. Here you can set the Weblogic Administrator account and define the Parent domain location. Click Next.


In next screen, you'll see the progress of the domain creation.


Now, in the next and final screen, you'll see the Configuration success scene. Here you can check the option to start domain. Leave it unchecked, so that we can start it manually. Click Finish. That's pretty much a plain vanilla installation of Oracle Weblogic server 12c on Mac OSX machines.

In my next post, I'll cover how to start and stop Weblogic 12c and any associated issues related to it.

Monday 10 February 2014

Info on decryptedFile.dmg - Mac OS X

I've come across many users who get confused or panicked, the moment they see something strange like "decryptedFile.dmg" in the Disk Utility. Well usually, it is the remnants of the last Flash Player install / update that you performed. Seemingly it is a harmless dmg. Although there is a well-known malware named Flashback, which disguises itself as the decryptedFile.dmg.

If you feel like it might be Flashback, check this link for detailed instructions on how to remove it manually. (Your system is clean if you have to jump from steps 1-3-8-9)

If its not the malware, then note these simple instructions for how to remove the harmless dmg from your system :
  • Open Disk Utility
  • From the left pane, control-click decryptedFile.dmg and choose the eject option
  • Again control-click decryptedFile.dmg and choose "Reveal in Finder" option.
  • Now, once you see the file in Finder (usually it's located in the sub-folders of /var/folders), delete it using Cmd-delete
Also, refer the following Apple Discussion page for more related content.

Tuesday 21 January 2014

Check if a user has root access in Mac OSX

On Mac OSX or any other unix flavor, you can find if a user has root access i.e superuser privileges or not. Open terminal and type the following

Eg:

sudo -l -U ironcladWriter

where the -U switch stands for user name.

If you have root access, you will see the following in the output :

User ironcladWriter may run the following commands on this host:
    (ALL) ALL

If by any chance, you don't know your username, type the following in Terminal :

whoami

Thursday 16 January 2014

Boxer - DOS games emulator for Mac OSX

Ever miss the classic DOS games of the 90's in the Windows era? Well, if you own a Mac, you can still play those classics on your machine.

Remember the first person shooters like Wolfenstein, Doom, Quake, Duke Nukem 3D or the side strollers like Bio Menace, Dangerous Dave, Prince of Persia, Aladdin or Lion King?

Well if you loved playing the above games, then BOXER is definitely the app for you. Period. Oh and by the way, it has nothing to do with boxing :)

Boxer is a beautiful DOS games emulator for Macs which is basically powered by the DosBox's emulation at its core.

DosBox can be separately installed on Mac, but many users might find it confusing and tricky to install it through Terminal. Boxer saves you those hassles. You don't need the technical expertise to run commands on the command line. All you have to do is download Boxer and the DOS games.

Now, if you're wondering where to find good old DOS games, please check out the following links :

DOS Games Archive

Liberated Games

Good Old Games

DosGames

Here's a quick simple walkthrough to use Boxer :

Once, downloaded simply open it to view the welcome screen.


Then go to any of the above DOS games sites and download the game. It usually might be a zip file.
Unzip it and click "Import a new game".


Now, all you have to do drag and drop the unzipped game folder into the dotted square as seen above. This will initiate the importing process. If the game has Install.exe as its installation program, it will be automatically selected at this stage.

Let's take an example of the Apogee Software's Bio Menace. You'll see the following screen once you drag-n-drop the unzipped folder. 


It will automatically select the Install.exe. You just have to click "Launch Installer". In the next screen you'll see the actual installation process, as it would have happened on a DOS prompt.


In most cases, you just have to follow the default steps in general, to proceed with the installation.


The screen below shows that the games has been imported successfully and is ready to be played on your Mac.


At this stage, you can drag and drop any image or cover art for the game, to make it look attractive and identifiable on your game shelf. 


Now, click "Launch Game". Sit back, relax and start playing :)


This emulator is similar to the Wine wrapper used to play Windows games on Mac OSX or Linux. 
Also, if you click the Display tab in Boxer's preferences, you choose the type of rendering style as seen below. 


Ok guys, am sipping on some Pepsi before the action begins. It's time to play Snake Logan and start shooting the dirty filthy alien monsters. Aaaaah I so feel like it's the 90's again :)



Bbye !


Monday 30 December 2013

Hardcode subtitles using Handbrake - Apple OSX

If you're a movie buff like me and watch a lot of non-english, foreign language movies, you must be coming across the headache to find english subtitles.

Although you can google and download the subtitles file ( .srt files ), it can be quite convenient to permanently hardcode the subtitles to the video. A very good app to do so is known as Handbrake

Although the main purpose of Handbrake is to transcode video into different formats, it is also useful to hardcode a .srt file to a video.

A sample screenshot is shown below :


As you see, you can simply choose a video by clicking Source. Then click the subtitles tab at bottom and click "Add External SRT" to choose the .srt file.

Once selected, just choose the Output format and click Start to encode. After it's done, you see a funny popup like this :)





Sunday 29 December 2013

Free up memory (RAM) in Mac OSX

While using Mac OSX at times you feel may some application is eating up too much memory, whereby the system performs too slowly. If you observe any noticeable lag in the performance, chances are a lot of memory RAM is being used up and the free RAM is too low.

In such a case, open the Terminal and type the following:

purge

This will free up a lot of used or inactive RAM.

In fact in order to check the exact figures, open the Activity Monitor from the Utilities. Then click the System Memory tab from bottom. Compare the figures of Used and Free Memory before and after running the purge command. You'll see that the Free Memory stats shoot up drastically, thereby improving the performance.


Saturday 28 December 2013

Show file extensions in Mac OSX

People new to Mac OSX often ask how do I see a file's extension, since by default the extensions are hidden. In order to view the extensions, do the following:


  • Open any finder window or just click anywhere on the desktop.
  • From the topmost Finder menu, click Preferences.
  • Click the Advanced tab in the Finder Preferences.
  • Tick mark the "Show all filename extensions" 


Saturday 21 December 2013

Safari 6 for OSX Lion - Buggy, Problematic

Why why why Apple did you "upgrade" Safari to actually downgrade it??

Safari v5.x was so nice previously and worked so smoothly.

Ever since its upgraded to v.6.1.1 on my OSX 10.7.5, its performance has sharply downgraded. It stops responding on certain websites. It eats up big chunks of memory. 

The previous cinematic most-visited Top Sites page was so tasteful than the now-simplified straight lines rectangular crap.

When you toggle between windowed and fullscreen, Safari usually tends to hang or stop working or you see the spinning wheel running forever.

Why have you changed the Bookmarks section? Previously it was so organized and helpful with the screenflow. Damn you apple and your android-y simple designs. 

Safari these days is so irritating, I've switched to Chrome for good.

For simple designs customers should buy cheap chromebooks, why the premium Apple should stoop down to cheapo level? Bring back the zing, the color than using the current stupid simplistic designs... End of rant

Wednesday 11 December 2013

OSX - Indian Rupee Symbol

For Indian users using, Mac OSX, here's a quick tip for saving the Indian Rupee ₹ symbol as a shortcut.


  1. Go to System Preferences -> Language & Text
  2. Then click the Text tab next to language
  3. Click the + button from bottom to add a new shortcut
  4. Type (INR or inr or Rs) under the Replace column and type the equivalent symbol under the With column
Check the following screenshot for reference

Now open up TextEdit and type INR and it will automatically replace it with the ₹ symbol.


Tuesday 10 December 2013

Shell Scripting : The Shebang

People who are new to shell scripting or are new to it often hear the term "shebang". If you're one of them, then you might have seen the shebang symbol in the topmost line in any shell script but maybe you're not sure what it means or what's its significance.

The symbol #!  i.e shebang is part of the topmost statement of a shell script which is used to tell which interpreter you'll be using.

Eg:

#!/usr/bin/bash  (Bash interpreter)

#!/usr/local/perl   (invokes the Perl interpreter)

#!//usr/bin/ksh (Korn shell interpreter)

#!/usr/bin/awk   (use the AWK interpreter)

Monday 9 December 2013

OSX Terminal Clear Screen

A lot of pro Windows users when switching to a Mac, often find it difficult to get rid of their old habits.

One of those habits happen to be clear screen (CLS) in the DOS prompt. But on a Mac, when you fire up a terminal window and type a few commands, you usually tend to type CLS later to clear the clutter. And you are are like Oh boy! how in the world do I clear the screen? :) when you see the error [ -bash: cls: command not found ]

Here's a quick tip: Just remember to type Command+K to clear the screen.

Tuesday 3 December 2013

Macbook Pro Battery Tips


  • Macbook Pro is one of the few laptops that have had the best battery performance in my opinion. Having used Dell and HP laptops loaded with Windows OS, in the past, it was evident how quickly the battery runs out of juice. Macbook Pro's on the other hand has had really good battery performance. I've heard that the Macbook Air has much better battery performance.

  • However, ever since Apple released the OSX Mavericks free upgrade, a lot of users have complained about battery issues. Infact the hullabaloo about battery issues is so loud, that I've refrained from upgrading to Mavericks even if it's free. As a matter of fact, if you see the 200+ feature list for the upgrade, you'll notice that a majority of 'new' features are useless. So instead, I just upgraded the Safari browser along with the other regular app updates. However, ever since Safari was updated to v6.1 even my battery drains out quite fast. I have a feeling that the Safari browser is a lot buggier than its previous versions and tends to max out the CPU and memory consumption - thereby draining out battery much faster.

  • Inorder to keep a track on the battery shelf life I've started to use an app called Coconut Battery. Its a small little utility to monitor the battery statistics. One good feature I liked about it is you can save data on various dates and keep a track on the charge cycles. My 15" MBP is more than 2 yrs old and has had close to 200 cycles by now. As per Apple's support article, my model supports a max cycle count of 1000.



  • I also read somewhere that the battery performance usually gets deteriorated due to overheating. Overheating happens when you run multiple apps which use system resources heavily. So it would help to keep a check on the battery temperatures as well. Deteriorating batteries tend to bloat and bulge thereby affecting the internals. You can check some apple discusiion forums about the same here.

  • You can also calibrate the battery by going powerless once in a while and allow the battery to completely drain out. Then let the laptop cool for some time. Once cooled down, plugin the power cord and restart again.
Related Posts Plugin for WordPress, Blogger...
eXTReMe Tracker