Friday, September 21, 2012

one of the favorite quotes

"Don't insult my intelligence!" (from the movie The Godfather I).  Understand it, if you can.

Wednesday, June 15, 2011

Trade-offs

Over the weekend realised that changing the kernel boot option to 64-bit from 32-bit impacted applications (at least Cisco VPN) I was using. The commands on Mac OS X were:

sudo systemsetup -setkernelbootarchitecture x86_64

and

sudo systemsetup -setkernelbootarchitecture i386

So, in life there are the trade-offs and in systems there are the trade-offs. Back to default setting of 32-bit :)

Friday, May 13, 2011

5 finger printscreen on Mac OS X

Today, I needed to printscreen function on my Mac. The following website was useful:

http://osxdaily.com/2010/05/13/print-screen-mac/

So, essentially there are 3-ways to do it:

Command+Shift+3: takes a screenshot of the full screen (or screens if multiple monitors), and save it as a file to the desktop
Command+Shift+4: brings up a selection box so you can specify an area to take a screenshot of, then save it as a file to the desktop
Command+Shift+4, then spacebar, then click a window: takes a screenshot of a window only and saves it as a file to the desktop

Pay attention that the last option requires 5 fingers!!! :) amazing

Thursday, January 27, 2011

macmail inline attachment annoyance

in mac mail for attachments:

defaults write com.apple.mail DisableInlineAttachmentViewing -bool yes

defaults write com.apple.mail DisableInlineAttachmentViewing -bool false

Restart Mail


Reference:

http://micahgilman.com/play/disable-mac-mailapp-inline-image-attachments/

Thursday, January 13, 2011

Embedding fonts in pdfs

In the recent past, I sweat alot over this issue. So, to cool others (or not to make others sweat), here is the workaround:

1- Below is exactly taken from Colin McMillens website http://colinm.org/tips/latex

To check whether fonts are embedded, use pdffonts, which is included with xpdf. pdffonts gives output that looks like this:

$ pdffonts paper.pdf
name type emb sub uni object ID
------------------------------------ ------------ --- --- --- ---------
FHQIOS+NimbusRomNo9L-Medi Type 1 yes yes no 6 0
NEESMN+NimbusRomNo9L-Regu Type 1 yes yes no 9 0
PJQNOS+CMSY10 Type 1 yes yes no 12 0

You want "emb" to be "yes" for all fonts (and possibly "sub" as well; also, all fonts should be Type 1, not Type 3). By default in Ubuntu, pdflatex should embed all fonts. Just in case, you can check /etc/texmf/updmap.d/00updmap.cfg, which should have a line like this:

pdftexDownloadBase14 true

If it's set to "false", change it to "true", then run update-updmap as root. Remake the PDF; if it still has non-embedded fonts, your figures are probably to blame. Check your PDF figures and make sure their fonts are embedded (using the pdffonts command). For anything that doesn't have embedded fonts, you can try the following magical invocation (all on one line):

gs -dSAFER -dNOPLATFONTS -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sPAPERSIZE=letter -dCompatibilityLevel=1.4 -dPDFSETTINGS=/printer -dCompatibilityLevel=1.4 -dMaxSubsetPct=100 -dSubsetFonts=true -dEmbedAllFonts=true -sOutputFile=figures/Mprime-new.pdf -f figures/Mprime.pdf

This creates a file "figures/Mprime-new.pdf" that is hopefully identical to the input file "figures/Mprime.pdf", except that the fonts are embedded. Run pdffonts on it to check.

Once all your figures are in PDF format, remake the paper again. Hopefully, all your fonts are now embedded -- check again with pdffonts.


2-Second way suggested by Abdul Jabbar was to print the pdf file from the adobe printer. This is the easy and quick solution.


Thanks to both Abdul Jabbar and Colin McMillen

Last option in Mac OS is:

3-Open the file in Preview and save the document to another file.


Sunday, January 9, 2011

Wireshark on Mac OS X

Recently installed Wireshark on a Mac OS X (Snow Leopard).

1- *Read* Readmefirst.rtf document

2- Enable viewing of hidden folders on your Mac. On your terminal window:

defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder


To disable:

defaults write com.apple.finder AppleShowAllFiles FALSE
killall Finder


Reference: http://macs.about.com/od/tipstricks/qt/hiddenfolder.htm
3- Move Wireshark icon to Applications folder

4- Move contents of the Command Line folder to /usr/local/bin

5- Drag the ChmodBPF folder onto the StartupItems alias.

6- Open X11 terminal

7- Change ownership of some files:

cd /Library/StartupItems/
sudo chown -R root:wheel ChmodBPF


Reference: http://www.kleinsch.com/2009/10/03/wireshark-chmodbpf-errors-on-snow-leopard/

8- Restart the machine.


Saturday, May 15, 2010

Starters

You start life... you start your engine to reach somewhere... and now starting the blog...