Skip to main content

Posts

Show full path in iterm

Show Full Path in Terminal Opern Iterm, duh! Go to you home direct Type:   cd ~ Type:   mate .bashrc Type:  export PS1=" " Between the quotation marks, you can add the following lines to customize your Terminal prompt: \d – Current date \t – Current time \h – Host name \# – Command number \u – User name \W – Current working directory (ie: Desktop/) \w – Current working directory, full path (ie: /Users/Admin/Desktop) export PS1="\u@\h\w$ "   which will look like:  Admin@MacBook~Desktop/$ " mate is text mate you need to install it in mac to make it work or you can also use free editors like nano, vi/vim. Source: soniajahid

View all drives in mac lion

Do you also feel the need to see all the files and folders that your mac has it is very easy and simple to do   Press ALT + TAB and select finder you should see this at the top selection menu  Then Click on Finder and then on Preferences You will see a menu like this  Now all you need to do is just check all the Hard Disk and External Drive boxes and you are done. Let me know if you have any more issues I'll be more than happy to help.

Refresh a page using jQuery

The easiest way to refresh a page is: to use "location.reload();" Example: $( document ).ready( function () { $( '#template_add' ).click( function (){ var textarea = $( '#textarea' ).val(); var tag = $( '#template_tag' ).val(); $.ajax({   url: '/templates/addtemplate' ,   type: "POST" ,   data: {text: textarea,temp_tag: tag},   success: function ( data ) {   location.reload();   } }); }); }); It is very easy process, let me know if you have any issues.

command to view stash in git

Hello,    today I learned about how to view the stash that you have on ur local system using terminal, I use github to store my repo and work on it, the command to do it is git stash show -p stash@{0} where you can replace 0 with the stack number. Happy forking! :)

get rid of remove You have new mail in /var/mail/username on a Mac

open a terminal and use mail at the prompt, then d to delete one message or d1-4 for for four messages. Then q to quit Hope it helped, I also want to give the credit of this answer to  dmckee ,  whitequark  for sharing the correct answer in  http://superuser.com/questions/149282/safely-get-rid-of-you-have-new-mail-in-var-mail-on-a-mac