How to download and install iOS 8 without deleting any of your data?

If you have tried downloading iOS 8 on your iPhone or iPad which is filled with applications, you might run into a problem. That’s because iOS 8 will prompt you saying that it needs 5 giga bytes of space to download and install the new OS. Though the size of the update is 987MB as shown on iPad and 1.5 GB on iTunes, you have to clear up the space to download and install.

So, how do you make 5 Gigabytes of space? Do you delete all your pictures, videos, or game apps? That is one way to do but I suggest not to do that. Because it’s crazyyy. There is other way around. Just connect your iPad/iPhone to your Mac/PC. Back up your device and then click on “Check for update” button in the iTunes and next when it shows iOS8 is available to download and install. Click on that and you are done.

Happy installing iOS 8 :D

How to launch Sublime Text App from Mac OSX Terminal ?

Hello,

It is quite simple to do this. Just follow the steps.

1. Open the Terminal and run ln -s “/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl ” /usr/local/bin/sublime

This will create a symlink called sublime between the subl binary stashed in Sublime application package and the folder where your system usually looks for binaries to execute(launch).

2. If the above command gives you an error saying   ln: /usr/local/bin/sublime: Permission denied. execute the command again by using sudo

Quick tip here: Just run sudo !!  instead of copying and pasting the entire path again. This will execute the previous command.

3. Now run open ~/.bash_profile and add  /usr/local/bin if you don’t have it in the $PATH.

4. Now execute source ~/.bash_profile if you have made any changes to the file. This command reloads your .bash_profile

5. Now run sublime command in the terminal to launch the application.

or

run sublime . to open an entire directory with the sublime text

or

run sublime folder name or file name to open a specific folder or file

 

Cheers,

SZ

 

 

How to add “Open in Sublime Text” service to any folder or a file on Mac – Shell Script

Hello everyone,

I have been using the sublime text lately. I am amazed with several jaw dropping features this gorgeous editor provides. I will writing more on sublime text and today  I am going to discuss about “How to add a service ‘Open in Sublime Text‘ as a service using a shell script on the Mac”. Its pretty simple and we will be using the Automator application to do this.

Step 1: Fire up the Automator application which is a native Mac application. Go to “File” menu and click on “New

Step 2: Select the type of the document as “Service” from the menu.

Step 3: In the search bar, type “Shell” it should “Run Shell Script“. Select it and drag it into the adjacent window.

Step 4: You will see a selection with text area. Copy the path of Sublime Text and paste it. The path of the Sublime executable file is:

/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl

Step 5: You can get this path by going to the Sublime Text app and right click on it and choose “Show package contents

Step 6: Now add -n $@ after the path which should look the following :

/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl -n $@

Step 7: Select “/bin/zsh” and “as arguments” from the Shell and Pass input drop downs respectively.

Step 8: Now, select “Files and Folders from the drop down menu saying “Service receives selected” and save it as “Open in Sublime Text

Step 9: Close the Automator and go to any folder and right click on it and under Services sub-menu you can see Open in Sublime Text.

I have attached the screen-shots for much more clarity.

S1 S2 S3 S4 S5 S6 S7 S8 S9

 

The End :)

Cheers,

SZ

Latex or pdftex command not found in Terminal Mac.

Hello everyone,

I have finally started learning LaTeX today and I am loving it. It is so much fun. On Mac, to run the LaTeX software, you can download the MacTeX distribution from the site which comes with three different packages. You can use the GUI tool to process the LaTeX file. But if you want to use the other editors and would like to run it through the terminal, then we have to do an additional step to make things work from the Terminal.

Adding the texbin to the $PATH variable makes the magic. One has to append the /usr/texbin to the $PATH variable. To do this, open the .bash_profile file and add the above path to the existing $PATH variable and save the file. Run source ~/.bash_profile to make the changes immediately.

Bingo, now you can run the latex or pdftex command in the terminal and process your LaTeX files.

Cheers,

SZ

How to reset the $PATH on Mac?

Hello everyone,

Today I experienced a panic attack when I edited my path variable and removed all the content from the $PATH by mistake. This might happen to any one, because we are humans and we often tend to make some stupid mistakes for which we do regret later. But this does have a small solution to undo the problem. You can reset the $PATH variable to the default position.

Let me first tell you what happens if you remove the existing path from the $PATH variable. One cannot use any of the commands in the terminal. Simple commands like open, clear, vim, touch nothing works. You cannot access the development packages through the terminal like python interpreter, java, gcc. Without these basic commands, a developer cannot survive. So, always be careful when you are going to edit your $PATH variable so that you don’t face any problems in the future.

Coming to the hack:

Obviously when you edit the /.bash_profile or /.profile  file, you might have used the text editor like TextEdit or emacs or any other editor.

So, go to the application which you have used to edit the above files and go to file menu and open the /.bash_profile or /.profile file from the recent menu.

After opening it, reset the path to its default by typing export PATH=/usr/bin:/usr/sbin:/bin:/sbin and save the file.

Open Terminal and run the command source ~/.bash_profile which will make the changes immediately.

Check the $PATH variable’s value by running echo $PATH. It should flash the /usr/bin:/usr/sbin:/bin:/sbin 

To confirm that your path has been reset properly. Type in the basic commands and check if they are working properly.

Note: Do not put any quotes around the path while you are editing it in the text editor.

Cheers,

SZ

Python Interpreter – Segmentation Fault :11 on OSX

This is one issue which I was facing on Mac OSX Mavericks 10.9.4. When you open the python interpreter in the terminal, executing two lines of code one after the other will give you an segmentation fault: 11 and the python interpreter closes.

For instance: >>> print ‘Hello’ gives you the output as Hello

Later, if you type in one more line of code say >>> print ‘World’

The interpreter exists with an segmentation fault : 11 though there is nothing wrong with the code.

This was issue for both Python 2.7.6 version and Python 3.3.3

Solution:

This is a bug in the readline compatibility in python, related to changes introduced in OSX10.9. This weekend, release candidates for Python2.7.6 and Python3.3.3 were released which fix this bug. The download links are below.

http://python.org/download/releases/2.7.6/

http://python.org/download/releases/3.3.3/

Here’s the issue, quoting from Ned Deily, writing on the python-dev email list.

On Tuesday, Apple released OS X 10.9 (a.k.a. Mavericks). There has already been a lot of interest in it, in part because Apple has made it available for free and has made it easy for users with 10.8, 10.7, and (most) 10.6 systems to upgrade directly to 10.9. Unfortunately, there are issues with our current maintenance releases (3.3.2 and 2.7.5) on OS X 10.9 that call for new maintenance releases as soon as possible.

One is critical in that it causes the interpreter to crash when running in interactive mode (http://bugs.python.org/issue18458). The problem was due to a long-standing compatibility issue in libedit’s readline compatibility layer that upstream has finally fixed and Apple has now shipped in 10.9. Because the python.org installers dynamically link to libedit, the original workaround in readline.c for the original design flaw in history indexing now causes a segfault on 10.9 when the user types in the second command interactively. Not good. Ronald devised a fix that allows readline.so at runtime to detect and work with either version of libedit so that we continue to have binary compatibility across multiple OS X releases. That fix is already out in the 3.4.0 alphas and backported to the 3.3 and 2.7 branches, awaiting release there. Just in the last 12 hours, there have been at least four duplicates of the issue reported by users. I’ve updated the original issue to explicitly mention 10.9, now that it is no longer under NDA, and to provide a downloadable script for inexperienced users to workaround the problem by “removing” readline.so. Presumably, as word gets out, there will be fewer duplicate issues opened but the impact will remain.

Downloading the required version from the above given links and installing python fixes this problem.

 

Cheers,

SZ