How to install node.js on Mac OSX?
R> go to the http://nodejs.org/ site and click install
How to uninstall node.js on Mac OSX?
R> sudo rm -rf /usr/local/{bin/{node,npm},lib/node_modules/npm,lib/node,share/man/*/node.*}
IojanBlog
Everyday challenges, thoughts and recipes by an IT guy
Sunday, October 13, 2013
Thursday, October 10, 2013
rsync magic
How to transfer filtered files and its entire directory structure to other unix machine, fast, compressed and efficiently? well... rsync
rsync -azvr --include-files='*.log' --include-files='*/' -exclude-files='*' --prune-empty-dirs <source dir> <target dir>
rsync -azvr --include-files='*.log' --include-files='*/' -exclude-files='*' --prune-empty-dirs <source dir> <target dir>
Sunday, October 6, 2013
Macbook Pro Fusion Drive
Finally i got my toys to convert my Macbook Pro laptop hard drive into a "Fusion Drive", it really works and it is worth the time spent. This is what it buy on amazon:
- The SSD, the fastest part of my new fusion drive: http://www.amazon.com/gp/product/B009NB8WR0/ref=ox_sc_sfl_title_3?ie=UTF8&psc=1&smid=A5NGTWX0QUPDH
- The Hard Drive Caddy, where the old hard drive goes after been replaced: http://www.amazon.com/gp/product/B009FWRZDY/ref=ox_sc_sfl_title_1?ie=UTF8&psc=1&smid=A3CFTGPNICL2HK
- The DVD drive slot, where the removed dvd drive goes after been removed: http://www.amazon.com/gp/product/B005RFOJT6/ref=ox_sc_sfl_title_2?ie=UTF8&psc=1&smid=A3HDZ91DLL5YJC
So, to get it done you have to:
- The SSD, the fastest part of my new fusion drive: http://www.amazon.com/gp/product/B009NB8WR0/ref=ox_sc_sfl_title_3?ie=UTF8&psc=1&smid=A5NGTWX0QUPDH
- The Hard Drive Caddy, where the old hard drive goes after been replaced: http://www.amazon.com/gp/product/B009FWRZDY/ref=ox_sc_sfl_title_1?ie=UTF8&psc=1&smid=A3CFTGPNICL2HK
- The DVD drive slot, where the removed dvd drive goes after been removed: http://www.amazon.com/gp/product/B005RFOJT6/ref=ox_sc_sfl_title_2?ie=UTF8&psc=1&smid=A3HDZ91DLL5YJC
So, to get it done you have to:
Monday, September 9, 2013
GeekTool CPU+Mem+Disk
Today I add a new geeklet to my desktop (http://projects.tynsoe.org/en/geektool/), it shows cpu+mem+disk and i needed it, because I'm tired to open Monitor application on my Mac.
I download the base version from:
http://www.macosxtips.co.uk/geeklets/modules/upload/attachments/CPUMemDskUsage.glet
And then make some adjustments to make it work with Lion and to improve performance. At the end the script look like this:
I download the base version from:
http://www.macosxtips.co.uk/geeklets/modules/upload/attachments/CPUMemDskUsage.glet
And then make some adjustments to make it work with Lion and to improve performance. At the end the script look like this:
Tuesday, September 3, 2013
Convert documents for Kindle with Calibre
To this day, the best tool i have found to convert documents to kindle format and upload them to the device is Calibre (http://calibre-ebook.com/), besides is a java software so it doesn't matter what operating system you have.
The most difficult case, a PDF document which have line breaks, headers, footers, lets see how its done:
The most difficult case, a PDF document which have line breaks, headers, footers, lets see how its done:
Wednesday, August 28, 2013
Automate Mail Depuration
Sometimes Apple Mail rules are not enough, so we have AppleScript to do whatever we want, this is how i automate mine:
tell application “Mail”
set |messages| to messages of mailbox “Inbox” of account “MyAccount”
repeat with |message| in |messages|
set |one day| to (30 * days)
set |date limit| to ((current date) – |one day|)
if date received of |message| is less than |date limit| and flagged status of |message| is false then
move |message| to mailbox “OldMail/Inbox” –on my mac
end if
end repeat
set |messages| to messages of mailbox “Spam” of account “MyAccount”
repeat with |message| in |messages|
set |one day| to (1 * days)
set |date limit| to ((current date) – |one day|)
if date received of |message| is less than |date limit| and flagged status of |message| is false then
delete |message| –account trash
end if
end tell
Source: http://luizsiqueiraneto.tumblr.com/post/26988382255/how-to-periodically-move-to-trash-old-messages, http://hints.macworld.com/article.php?story=20081019114709793
tell application “Mail”
set |messages| to messages of mailbox “Inbox” of account “MyAccount”
repeat with |message| in |messages|
set |one day| to (30 * days)
set |date limit| to ((current date) – |one day|)
if date received of |message| is less than |date limit| and flagged status of |message| is false then
move |message| to mailbox “OldMail/Inbox” –on my mac
end if
end repeat
set |messages| to messages of mailbox “Spam” of account “MyAccount”
repeat with |message| in |messages|
set |one day| to (1 * days)
set |date limit| to ((current date) – |one day|)
if date received of |message| is less than |date limit| and flagged status of |message| is false then
delete |message| –account trash
end if
end tell
Source: http://luizsiqueiraneto.tumblr.com/post/26988382255/how-to-periodically-move-to-trash-old-messages, http://hints.macworld.com/article.php?story=20081019114709793
Convert PST to MBOX
Importing from outlook to apple mail not difficult at all, at your mac os terminal:
1) install libpst (macports required)
sudo port install libpst
2) convert the pst
readpst -o <output directory> <my pst file>.pst
3) Import
At apple mail: File > Import mailboxes > Files in mbox format
thats all
Subscribe to:
Posts (Atom)