Monday, November 30, 2009

github, ssh config file and ssh-agent

Github makes use of ssh-keys for checking out your stuff via git. I also have several different keys and store them with different names such as github_rsa or some such. In order to get this to work, you have to create a config file that stores the location of the private key.

For github, in the .ssh/ directory, create a file `config` and enter in the following:
From github's help page:

Host github.com
User git
Hostname github.com
PreferredAuthentications publickey
IdentityFile path-to-private-key


In several situations I've had to set up ssh keys for remote machines that only provide me with terminal access. Thus I keep getting pestered to enter the passphrase for the ssh key. ssh-agent takes care of having to keep entering in the passphrase.

After setting up the ssh-keys do:
eval `ssh-agent`; ssh-add ~/.ssh/github_rsa

It will then ask for the passphrase the one time when it adds the key to the agent, and then wont ask again.

The 'let go' command

I was recently let go from the place where I plied my craft (I left on ok terms). The only real issue I had was that the computer I used there was a company computer, and during the time I had spent there, I had done things such as purchase stuff on amazon.com, save passwords to various email accounts in browsers, etc. So to rectify this situation and ensure that nobody using the computer after me had access to my data, I rebooted the machine in recovery mode (this was an ubuntu box) and ran

find /home/tfdml/. -type f | xargs shred -fu ; rm -rf /home/tfdml/ ; shutdown -h now

then gathered my belonging's and left. Note that I could have just as easily switched to an alternate terminal with ctrl-alt-f1 and ran the command there.

This ensured, at least to my level of paranoia, that all my personal information was secure. Now, all documentation, code and notes were all stored in the company repo, so it's not like I was being malicious and destroying all the work I had done for the company. This removed all of my own personal information from the machine without having to reformat the drive or any other such drastic measures and allowed for the company to quickly turn the machine around for another worker to use.

(Edit: It turns out this command didnt work as well as I planned as apparently it took quite some time to run. Eventually one of the other dev's there saw the machine was on and simply turned it off since there was nobody using it anymore. This allowed the guy who got the computer after me access to some of the files in my account. In retrospect, I should delete all the huge files (anything over a gig, music directory, vm images) before running this command and ensuring that the command is only going to operate on a set of files that amount to at most a gig.)

Tuesday, November 17, 2009

"so that" vs "such that"

So that or such that? Found a nice article that covers these issues, as well as a few other cool grammar bits for mathematicians.

From the article:

Here are the definitions.

so that

  1. In order that, as in I stopped so that you could catch up.
  2. With the result or consequence that, as in Mail the package now so that it will arrive on time.
  3. so ... that. In such a way or to such an extent that, as in The line was so long that I could scarcely find the end of it.
From dictionary.com

such that

  1. adj : of a degree or quality specified (by the "that" clause); their anxiety was such that they could not sleep. (dictionary.com)
  2. A condition used in the definition of a mathematical object. For example, the rationals can be defined as the set of all m/n such that n is nonzero and m and n are integers . (mathworld.wolfram.com)

Examples

  1. We require x to be a rational number so that mx is an integer for some m. [Correct]
  2. We require x to be a rational number so that 3x is an integer. [Incorrect; should be such that 3x is an integer.]
  3. Let H be a discrete subgroup of the Lie group G so that G/H is compact. [Incorrect --- not all discrete subgroups of Lie groups have compact quotient; this is from the Annals of Math., 107, p313.]
  4. Let N and N' be submodules of a module M such that N contains N', so that N/N' is a submodule of M/N'. [Correct! From Steps in Commutative Algebra.]

Briefly, if omitting the "that" from "so that" renders the sentence nonsense, then it was already nonsense, and you should have used "such that". You won't find "so that" among lists of commonly misused expressions because only mathematicians commonly misuse it. Probably the error arose from the influence of German on American (mathematical) English, since the two are not distinguished in German.


Mathlish

Wednesday, November 4, 2009

da Vinci quote

Those who are enamored of practice without science are like a pilot who goes into a ship without rudder or compass and never has any certainty where he is going. Practice should always be based upon a sound knowledge of theory.