Showing posts with label hacks. Show all posts
Showing posts with label hacks. Show all posts

Monday, September 7, 2015

Mac Tricks & Hacks


  1. NTFS Support
    1. Install ntfs-3g-2010.10.2-macosx.dmg & Restart
    2. If it throws error, Install macfuse-core-10.5-2.1.9.dmg
  2. Hide Apps from Application Switcher
    1. Sometime you want to hide application e.g. torrent client activity when pressing Cmd+Tab
    2. Add the following in the respective Info file. E.g. In /Applications/uTorrent.app/Contents/Info.plist
    3. <key> LSUIElement </key> <string> 1 </string>
  3. Default Vim Syntax Highlight
    1. echo "syntax on" >> ~/.vimrc
  4. Default color Theme
    1. echo "colo desert" >> ~/.vimrc
  5. Default intend
    1. echo "filetype plugin indent on" >> ~/.vimrc
  6. ntfs support in mac
    1. Create /etc/fstab and write
      1. LABEL=DRIVE_NAME none ntfs rw,auto,nobrowse
    2. It is ready. However, If finder doesn't show in finder, use open DIR_NAME

Wednesday, January 2, 2013

Hacking Mac : Useful installations & shortcuts

Some of the software usually you'll love to have:


Mac Installers:
  1. iSync (not available for Mountain Loin)
  2. Adobe Reader
  3. Adobe flash player
  4. Adobe Air
  5. Twhirl
  6. Evernote
  7. OneNote
  8. Picasa
  9. Adium
  10. Alfred
  11. Skype
  12. Chrome
  13. VLC
  14. Keepassx
  15. X11 and XQuartz (Macport)
  16. MySQL (mysql/php configuration)
  17. Skitch
  18. Sublime 2
  19. SilverLight
  20. ImageMagick
  21. Ntfs-3G
  22. Java & eclipse
  23. GreaseMonkey / TemperMonkey Script - firefox/chrome
Commands:
  1. Install .dmg from Command Line : hdiutil mount cotvnc-20b4.dmg 
*nix Commands:
In Mac Terminal:

  1. ls -lSr : list files (-S for sort by size)
  2. cd - :  to swap directories to the previous working directory
  3. for f in *.txt;do echo $f;done : Looping over a set of files
  4. find . –name "*.txt" –mtime 5 : files & folders modified in the last 5 days
  5. rename –v 's/foo/bar/g' * : Rename files using regular expressions
  6. mv /path/to/file.{txt,xml} #rename just part of a filename
  7. cp /etc/rc.conf{,-old} #Backup of the file
  8. sudo !! #represent the last command you ran
  9. mkdir my{1,2,3} #will create my1,my2 & my3 folders
  10. Bash Shortcut 
    1. Ctrl + U: Clears the line from the cursor point back to the beginning.
    2. Ctrl + A: Moves the cursor to the beginning of the line.
    3. Ctrl + E: Moves the cursor to the end of the line
    4. Ctrl + R: Allows you to search through the previous commands.
  11. Using Alias : Some useful examples
    1. alias agi='sudo apt-get install'
    2. alias emp='cd /usr/local/mysql/data/employee'
    3. alias grep='grep --color'
    4. alias ls='ls –l' # if you always wanted ls to actually do ls –l


Some shorcuts:
  1. Shift + Command + I : Compose outlook
  2. Shift + Command + N : New Folder
  3. Shift + Command + 4 : Screen Capture
  4. Command + Alt + D : Dock Hide / Unhide
  5. Command + Alt + Esc : Force Quit
  6. Command + M : Minimize
  7. Command + H : Hide 
  8. Command + D : Clone in finder
  9. Command + Q : Quit
  10. Command + I : File Info
  11. Command + S/C/V : Save/Copy/Paste
  12. Command + Delete : Delete
  13. Enter / Return : Rename
  14. Space : Quick Info
  15. Command + Space : Spotlight
  16. Delete : Backspace
  17. Delete + fn : Delete
  18. Command + Z : Undo
  19. Command + Shift + Z : Undo
  20. Command + Left : beginning of line
  21. Command + Left : Ending of line
  22. Alt + arrow : jump by word
  23. Command + Alt + I : Inspector in Browser
  24. Shift + Ctrl + arrow: Word selection
  25. ctrl + arrow : Desktop switch
  26. Lock Screen : Enable Hot Corner

Monday, May 9, 2011

Firefox Bookmark Keyword Hack

Previously I specified few firefox hacks to ease your daily internet surfing. Here I'm trying to explain how to use Firefox Bookmark Keyword hack.

Firefox provides a nice feature to Bookmark a URL and opening that for different input provided. E.g. If you want to search "Barack Osama", you can simply type "yahoo Barack Osama", and it will directly give your the search results.
Lets do it step wise.
  1. Open the desired URL e.g. http://search.yahoo.com/search?p=Barack+Osama
  2. Bookmark the page
  3. Go to Organise bookmarks (FF version < 4.0) or Show All Bookmarks (FF version >= 4.0)
  4. Search for the book-marked page here e.g. ysearch
  5. Expand the property of bookmark (below "tag")
  6. Replace the search string "Barack Osama" with %s
  7. Enter keyword using what you want to do the search e.g. "yahoo"
  8. DONE!


Type e.g. "yahoo < your name > " and enjoy the search results.

Don't limit yourself to this, create more bookmarks. Like for my personal use, I've setup many bookmarks like:
  • Facebook name search "fb < name >" (http://www.facebook.com/search.php?type=users&q=%s), 
  • Bugzilla search "bug < bug id >", 
  • Yahoo search "yahoo < search string >", 
  • Microsoft bing search "bing < search string >", 
  • Google search "google < search string >".

Saturday, January 23, 2010

Firefox hacks to make browsing easy

Undoubtedly, Firefox is the best browser available in the market. Virtually there is no limit of customization you can do with Firefox. Most of these comes as extensions (add-ons).
However, settings can also be customized easily by accessing convenient location using Firefox's "about:config" hack, which can be opened by typing it into the address bar. Steps to change settings can be followed as:
  • Type "about:config" in the address bar, and press enter
  • Search for the setting in the "Filter" bar within that
  • If desired search result found, double click to change the value, which can be integer, Boolean or string type
  • In case a setting doesn’t show up in the search, just right-click and select New to create it.
  • Restart Firefox

By following the above steps, different customizations can be done. I'll list a few here which may be useful for you as well.

1. Stop sites to blink the Text : Some websites have blinking text which irritates a lot. It can be stopped as
  • In Filter search, type: "browser.blink_allowed"
  • Set its the value as "false"
2. Open search result in new tab : Search has become the integral part of our net surfing, and while using Firefox, I quickly hit "Ctrl + k" or "Command + k" (mac) to type the keywords to get the results. However, either it will over-write the existing page or I need to open new tab first, which means extra key strokes. The setting to open the search results in new tab can be done as
  • In the Filter search, type: "browser.search.openintab"
  • Set its value as "true"
3. RAM (Memory) optimization when Firefox is minimized (Windows only) : RAM is a precious commodity. All the applications carry out their processing in the RAM. Many applications in some operating systems, returns unused RAM when they are minimized. The problem with Firefox arises in the way it handles RAM - Not releasing it when minimized. It can be handled using config.trim_on_minimize setting. Please note that, it (Windows only) does not reduce the amount of memory used, it just swaps memory from RAM to disk.
  • Create new Boolean variable "New -> Boolean" by doing right click
  • Name it as "config.trim_on_minimize" and set the value as "true"
4. Maximum amount of pages to be stored in memory (more) Variable browser.sessionhistory.max_total_viewers can be set to some positive number in about:config to limit the amount of pages to be stored in the memory. Default is -1, which means it automatically determines the maximum number of pages. Users not facing any memory problem may set -1. To change it
  • In the Filter search, type: "browser.sessionhistory.max_total_viewers"
  • Double click, and change value to some positive number (number of pages allowed to be stored in memory)
5. Use Firefox Bookmark Keyword

Other References:

LinkWithin

Related Posts with Thumbnails