How to electronically sign PDF documents on Mac?

Here’s the thing I found very amazing in Mac’s default PDF viewing software, Preview. You don’t need to buy Adobe Acrobat or any other software to sign a document. It’s nice and easy on Mac.

There are two steps.

Step 1: Save your handwritten signature to Preview.

Open Preview -> Preferences -> Signatures tab. Click on Create Signature.

Screen Shot 2013-09-04 at 9.19.38 PM

Write your signature clearly on a white paper and put it in front of your Mac’s camera. Mac’s Preview will recognize your signature like a charm. Click Accept.

Step 2: Put your saved signature on the PDF

Click on “Show Edit Toolbar” button on the upper right of Preview window to expand the toolbar. Then click on the “Signature” button in the tools list.

Screen Shot 2013-09-04 at 9.28.20 PM

Put your mouse on where you want to put the signature then click on it. You can drag and resize your signature too!

 

Password Overhaul

1password

Recently I spent several hours to put all my usernames/passwords written in plaintext on my computer into an app: 1password.  Another several hours were spent on reconfiguring some important passwords (e.g. Facebook, bank, this blog) with randomly generated strings. It’s a good thing and also a bad thing. Now I don’t have to worry about someone breaking into one of my account gains access to a dozen of other accounts with similar passwords. However, I can no longer remember any of them. I have to buy 1password for my iPhone, iPad, Mac in case of any user authentication. So if someone breaks into my 1password account, all of my passwords would be exposed to sunlight. Kind of a tradeoff.

Vim Configuration Over SSH

Vim seemed to not working properly when I remotely connected my mac with Berkeley’s remote machine. My mac has OS X Mountain Lion 10.8.3 and I connected to a server running Solaris 10. When I was editing a file using Vim, the arrow keys printed “A”, “B”, “C”, “D” and delete key simply did nothing. And after a short time of search I found this works for me and hopefully this can help you too.

First go to the root directory of the remote machine: vim
cd /

Then create a new Vim config file .vimrc
vim .vimrc

Add these two lines to this file to correct arrow keys and delete key behavior.
:set nocompatible
:set backspace=start,eol,indent

And that’s it, it works for me and if there is any better solution I’m happy to know!

What do you wish you’d known before your first software developer internship?

m4s0n501

Learned part of this through my last internship. Very valuable to me.

Answer by Alex Gartrell:

I've twice been an intern and twice managed an intern.  If I had to distill down what I've learned from these experiences, I'd say that there are three important things for an intern to think about

1) Deliver high quality code.  It's really easy to fall into your college habits of hacking on stuff and then turning in something with a fair number of minor flaws (extra printf's, commented out code, missed edge cases etc.)  Ultimately though, the people employing you are going to be making a hiring decision based upon your work, and one way for them to answer that question is "Do I trust this person to work here?"  Having a history of solid, clean commits is the best way to earn their trust.

2) Be visible beyond your manager.  Good intern managers exist more as teachers and advocates than as evaluators, and so the feedback of other members of the group is taken very seriously in offer consideration.  I'm not suggesting that you should be boastful (in fact, the full timers will see right through you if you are), but you should make sure that you're regularly updating people with the progress of your projects, especially with data that shows that you're doing the right thing.  Ultimately, it's better to figure out that a project isn't working out fast and get assigned to a new one than it is to drag it out because you're afraid of bad news.

3) Be aware of where you stand.  Good companies take care to obscure the relative seniority of different employees in a way that allows the very senior and very junior to collaborate on projects without social pressures that could screw up the dynamic.  Unfortunately, there's no way to obscure the fact that someone is only here for a 12 week internship, so these problems spring up in full-time/intern relationships.  The problem is exacerbated by the fact that it's almost universally the case that it's much easier to become an intern than to become a full timer.  The net result is that if you find yourself in fundamental conflict with a stubborn full-timer, you're probably not going to be able to push back.  Great engineers and managers will take constructive feedback from anyone, but it's important to recognize that there are mediocre people out there, and, as an intern, you'll be best served by avoiding conflict with them.

View Answer on Quora

Facebook Session Hijacking

You don’t want someone else to impersonate you to login Facebook, or other social network, right?

And today while I read some articles about session hijacking, I think it’s a good idea to turn on “Secure Browsing” on Facebook account setting under “Security” option to prevent attackers from gaining unauthorized access to your computer system.

Facebook Secure Browsing Option

Many websites, including Facebook, use HTTP cookies to maintain session. A session is a semi-permanent connection between two computers (e.g. your browser and server). You must have such experience before: when you first time sign into Facebook by typing username and password, the next day you can still login without typing them again, even after a week. That’s because Facebook saves a “HTTP cookie” on your browser to maintain this connection.

By default, Facebook only uses HTTPS protocol, a secure protocol, when you need to send password on the public Internet and that’s when you login or logout. Notice the green lock and “https” word on the left hand of the address bar. However the whole website is not covered by HTTPS. Notice the green lock and “https” disappear after you login. And that exposes some security concerns over transmitting data on the Internet. For example, an attacker could use packet sniffing to read traffic between two parties to steal session cookies.

So, just take 30 secs to turn on that setting on Facebook and your account can be safer.

Hello world!

This is my first blog. I do appreciate the humour behind the title of the default blog: Hello world, since this is so familiar to every computer science student when we learn a new language.

For me, it’s important to share what I think is useful with others and hope you all enjoy my blogs : )