Sunday, December 26, 2010

rsync from iTunes dir to SD card

So I'm using rsync to get music from my Mac to the SD card in my Samsung Intercept. I don't want all my music, I want to pick and choose. I'm using the following as my rsync command:

rsync -hrltvz --modify-window=1 --exclude-from=exclude-from-file

My exclude-from-file looks like this:

- *.m4p
- *.wav
- *.DS_Store
+ Blue October/***
- *

The final - * tells rsync to skip everything. The only thing that is copied over is the Blue October directory and everything under that directory. Any .m4p, .wav, and .DS_Store files are also excluded. To add a new artist for syncing I just add a line + artist/*** to the exclude file.

rsync to SD card recopying files

I was trying to rsync some iTunes music to an SD card from my Mac. All was working well but all the files were being synced each time. Turns out it's an issue with a Microsoft(FAT32) formatted card, which my Samsung Intercept has. Answer was to add --modify-window=1 as an rsync option. Solution here.

Friday, December 24, 2010

Multiline comments in bash

:<<MULTILINECOMMENT
echo "foo"
echo "bar"
this="variable"
MULTILINECOMMENT

Friday, December 10, 2010

Concatenation in PostgreSQL


Concatenate using || and string in side single quotes:

SELECT col1||' string goes here '||col2 AS msg FROM tbl WHERE col1=10

Random number generation on PostgreSQL

SELECT round(CAST (random()*10 AS numeric),2) AS rand_no;

Friday, November 19, 2010

SSH from OS X to Juniper firewall

Had to redo my Mac recently and started having problems with ssh to a Juniper firewall. I could ssh into the firewall but would be dropped 30 seconds later. Took me a while to get the search terms right but eventually found this post explaining the situation.

The problem was I had a custom ssh config file in ~/.ssh/config and had ServerAliveInterval set to 30(ServerAliveInterval=30). Had to add an extra rule for the firewall and set that value to 0.

Saturday, May 8, 2010

Slowly learning about sports photography

So I got the 70-200 f4 lens and got a chance to shoot one of the boys soccer games last week. I'm definitely getting more keepers but it's not just a result of the lens. I spent some more time studying what you need to do for sports photography and figured out I was doing some things wrong. First, I need to shoot in AI Servo focus mode which has predictive autofocus. Combine that with drive mode in continuous shooting and you should be able to get more in focus shots with moving subjects. That seemed to help quite a bit. I've always shot in continuous drive mode but didn't use AI Servo focus. I also set the shutter on 1/250 so I'd always freeze the action. The mistake I made was turning off the IS. I figured it would save some battery life because I was getting low and thought(I don't know why) it might slow the autofocus a bit with a moving subject. Problem is I forgot that the lens on my camera fully extended is a 320mm lens, hence some blurred shots. I'll leave IS on next time because I don't think it eats up that much extra battery and doesn't affect autofocus speeds. One other "mistake" I made was to not fix an autofocus point. I emailed one friend who does sports who said he fixes the center focus point and I've now read others do that. By not fixing it, the camera chose the focus point and while I did get a couple more interesting shots, I missed some I would have had if I had used the center focus point. And last, I shot in RAW. Rather dumb since I don't plan to do any adjustments and my camera has a higher burst rate shooting straight JPEG than RAW. So my list for next time is:

  1. Leave IS turned on on the lens. Oh and charge batteries ahead of time
  2. AI Servo focus setting
  3. Center focus point fixed
  4. Continuous drive shooting mode.
  5. Shoot high quality JPEG only.
  6. Shoot in shutter priority at 1/250 second.
  7. Check ISO speed as I go along. Found out cloudy days I need to jump to 800 or even 1600.
That's it. I really need to keep that list with my camera bag just as a double check. But I did get more keepers so I'm pleased. Should have even more next time.

Sunday, January 17, 2010

Lens is coming

I ended up with the 70-200 f/4 IS USM. I figured in the end the f/4 should be good enough for shooting soccer outdoor and may even work for indoor if there is enough light. The boys don't play indoor yet but they may someday. Hopefully I'm covered. There were a bunch of things that went into my decision:

1. Build quality of 70-200 L lens is outstanding from what I've read.
2. 70-300 f/4-5.6 has a focus ring that rotates during AF which can cause issues if you have a hand on it when it's focusing. I could see that being an issue.
3. 70-300 f/4-5.6 has a front rotating element which makes using polarizers next to impossible.
4. photozone.de results for 70-200 are amazing. According to those tests the lens is excellent throughout it's range and across the entire image
5. I figured you only live once and I was fortunate enough to have the mondy to get it so why not.

It will be here on January 20th. I'm excited to try it out.

Tuesday, January 5, 2010

More and more lenses

This is actually getting to be fun. The more I look, the more bargains I am discovering. Apparently the 55-250 and the 70-300mm f/4-5.6 USM IS are pretty highly thought of lenses that don't carry a large price tag. The 55-250 is $255 brand new. The 70-300 comes in at $550. So that gives me some more thinking to do and options to consider. My big concern would be if these would work well for shooting my son's soccer games. Not sure how the AF works on these regarding sports. I'll have to look into it some more.

Saturday, January 2, 2010

Figuring out what I want to do

One of the things I've wrestled with in the past is whether or not I want to start a little photography business. This would obviously be something on the side where I shoot after work or on weekends. I almost got going a few years ago but never quite pulled the trigger. I did a senior photos shoot for a neighbor and they loved the results, or so they told me :). I thought that would get me started but I never put any effort into getting more business. Here I am a couple of years later with a renewed spirit for taking photos and that question popped into my mind again. The big reason it did was that I used a friends 28-70 f/2.8 lens this fall and loved how the photos looked. I decided I wanted one for myself. Well, if I'm going to spend that kind of money then I should try to make some money as well right? For me, the answer is wrong. I just don't want to give up my free time to take photos for someone else, then process them, then print them, then meet with the person to give them there photos and wrap up. I want to spend the bulk of my time just shooting and other stuff that really interests me, like fishing and playing soccer. So I've decided this will always just be a hobby for me, an expensive one :). I'm sure I'll do my own kids senior photos and occasionally do a shoot for someone if they ask but I'm definitely not going to market myself and try to turn it into a business. In my gut this feels like the right decision and has for a couple of weeks now.