Thursday, March 25, 2010

A winning combination




This is absolutely heavenly: Dipping Milano cookies into plain Greek yogurt.

Tuesday, March 16, 2010

Spring break dates

When is the last time your spring break matched up with those of your friends from back home (who go to different universities)? I was lucky enough to experience this maybe once in my four years of undergrad, and even then only with one or two friends.

I propose that Spring Break dates should be standardized nationwide (perhaps even worldwide, but I don't know foreign education systems).

I see absolutely no difficulty that this would present to schools, and it would make millions of people's lives so much better. The standardization process is simple too -- have the U.S. Department of Education decide on a week and inform every university.

Why hasn't this happened yet??

This country is a scary place

Sometimes, this country really frustrates me:
Internet Virus Frames Users For Child Porn

To summarize if you don't feel like reading: People are being imprisoned after their computers are getting infected by viruses which download child pornography. These people do nothing wrong, but end up being robbed of their dignity and reputation and incarcerated. The article gives an example of one man wrongly accused in this way:
Fiola was fired and charged with possession of child pornography, which carries up to five years in prison. He endured death threats, his car tires were slashed and he was shunned by friends.
...
The charge was dropped – 11 months after it was filed.
...
"It ruined my life, my wife's life and my family's life," he says.
What bothers me is this country's unrelenting stance on child pornography. I would understand if the people being punished were producing child pornography -- but to ruin their lives because there is a sliver of possibility that they were viewing child pornography? That is just unreasonable. Inappropriate interaction with real, living, breathing children is truly worthy of a severe and merciless punishment -- but we are talking about pixels on a screen here.

A very unnerving aspect of this is that it could happen to any one of us. This particular article talks about being infected with a computer virus, but there have also been cases of people being punished for unintentionally downloading child pornography over a file sharing system. Perhaps they were not paying attention to the filename, or perhaps the file was misnamed to mask it's sinister contents, I do not know the details. There is a news story of this happening to a 22 year old guy, and he is quoted as saying:
"It didn't appeal to me,' he said. 'I was looking for women my age, so I just wanted to download 'College Girls Gone Wild' and accidentally downloaded underage pornography."

Matt claims he quickly erased the files.
Frankly, I believe him. But now he is facing 20 years in prison and must spend the rest of his life as a registered sex offender, and I feel terrible for him. Imagine yourself in his shoes...
And as the end of the article shows, he's not alone in accidentally stumbling upon such vile material:
Internet searches reveal a large number of complaints from people who say they've accidentally downloaded child pornography through Limewire.
This is a scary prospect, and the fear comes from this country's irrational stance on the matter. I guess the take-away message from all of this is:
Be very, very careful what you click on and what you download.
Previously I had thought this to only matter in terms of keeping my computer clean of viruses/spyware/malware, but it seems that following this simple rule can also keep you out of prison.

Wednesday, March 3, 2010

Create and extract tar.gz files

This post is intended as a self reminder.

To create a *.tar.gz file:
tar -czf filename.tar.gz dirpath

To extract a *.tar.gz file:
tar -xzf filename.tar.gz

Explanation of -czf:
c: create archive
z: pass the archive through gzip (to create .tar.gz vs .tar)
f: the following argument specifies the filename to use

Explanation of -xzf:
x: extract from archive
z: pass the archive through gunzip (to extract from .tar.gz vs .tar)
g: the following argument specifies the filename (the archive file) to use

Monday, February 22, 2010

Vim multiple commands in configuration file

I was struggling to come up with a means of mapping a keystroke to execute multiple Vim commands, within the .vimrc settings file.
Somewhere I read that to string multiple commands on one line, they must be separated with a | (pipe). That works inside of Vim, but causes errors when placed inside the configuration file.
Then I tried using :argdo, which also worked inside of Vim but not in the configuration file.

Finally I came upon a blog post which solved my problem. It appears that in the configuration file, pipes for separating commands must be escaped with a forward slash \.

I used to have a line in my configuration file:
noremap <silent> <C-h> :noh <CR>

This means that pushing Control-h would remove search highlighting.

Now it is:
noremap <silent> <C-h> :noh\| :set number!\| :set list! <CR>

The added commands toggle visibility of line numbers and whitespace. I like having those things visible, but I often need to copy text from vim to somewhere else and the line numbers and line-terminators get copied with it if they are displayed.

As for why I added these commands to an existing mapping: I am a vim novice and unaware of many vim shortcuts, so I decided not to accidentally overwrite any shortcuts. I figured that the existing Ctrl-h command was used rarely enough so that the annoyance of having to now push it twice for clearing highlighting (to negate the toggling produced by the first push) was an acceptable price to pay. And also one less shortcut to remember.

Sunday, February 7, 2010

Salsa and rice

Here's two things you can do if you have salsa and no tortilla chips:
1. Buy some tortilla chips.
2. Cook some rice and eat it with salsa. Rice on its own is too bland to eat, but the salsa is already full of vegetables and spices and can turn a bowl of rice into a delicious meal.

No joke, try it.

P.S. You can do this with other foods like pasta, buckwheat, etc.

Saturday, February 6, 2010

Tortilla chips and corn

Here's two things you can do if you have tortilla chips and no salsa:
1. Buy some salsa
2. Open a can of corn and use it as dip. Tortilla chips are delicious with canned corn.

No joke, try it.