Dec 8 2009

github and submodule weirdness

So I’m not a git or github master by any means. For the most part, I know enough commands to get by and to get myself into trouble every now and then. My experience so far has been good with git and github, but today I ended up banging my head on a wall while I tried to figure out what was going on. Follow me, on this little trip down a rabbit hole. Maybe someone can explain what’s going on here.

First I generate a rails app:

lappy:tmp bsmith$ rails foo

Then I add restful authentication, using the command listed in the install documentation:

lappy:tmp bsmith$ cd foo/
lappy:foo bsmith$ cd vendor/plugins/
lappy:plugins bsmith$ git clone git://github.com/technoweenie/restful-authentication.git restful_authentication
Initialized empty Git repository in /Users/bsmith/tmp/foo/vendor/plugins/restful_authentication/.git/
remote: Counting objects: 1741, done.
remote: Compressing objects: 100% (590/590), done.
remote: Total 1741 (delta 1010), reused 1641 (delta 957)
Receiving objects: 100% (1741/1741), 733.93 KiB | 831 KiB/s, done.
Resolving deltas: 100% (1010/1010), done.

Then I add everything to git:

lappy:plugins bsmith$ cd ../..
lappy:foo bsmith$ git init
Initialized empty Git repository in /Users/bsmith/tmp/foo/.git/
lappy:foo bsmith$ git add .
lappy:foo bsmith$ git commit -m ‘init’
[master (root-commit) f63c7ea] init
43 files changed, 8462 insertions(+), 0 deletions(-)
create mode 100644 README
create mode 100644 Rakefile
…[followed by lots more output]

Then I pushed it to github:

lappy:foo bsmith$ git remote add github git@github.com:benjaminleesmith/submodule_test.git
lappy:foo bsmith$ git push github master
Counting objects: 64, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (56/56), done.
Writing objects: 100% (64/64), 79.32 KiB, done.
Total 64 (delta 10), reused 0 (delta 0)
To git@github.com:benjaminleesmith/submodule_test.git
* [new branch] master -> master

Next, I take a look at the vendor directory that got committed go github:

From screen shots

I assume that the little folder icon with an arrow means that the restful authentication code is being hosted elsewhere… as a submodule maybe? The folder is not clickable, so I can’t see what’s inside… if there’s anything!

So my next step is to pull the project, say for a deployment on another system:

lappy:tmp bsmith$ mkdir bar
lappy:tmp bsmith$ cd bar/
lappy:bar bsmith$ git init
Initialized empty Git repository in /Users/bsmith/tmp/bar/.git/
lappy:bar bsmith$ git pull git://github.com/benjaminleesmith/submodule_test.git
remote: Counting objects: 64, done.
remote: Compressing objects: 100% (56/56), done.
remote: Total 64 (delta 10), reused 0 (delta 0)
Unpacking objects: 100% (64/64), done.
From git://github.com/benjaminleesmith/submodule_test
* branch HEAD -> FETCH_HEAD

Then… I go searching for restful auth in this latest pull…

lappy:bar bsmith$ cd vendor/plugins/
lappy:plugins bsmith$ ls
restful_authentication
lappy:plugins bsmith$ cd restful_authentication/
lappy:restful_authentication bsmith$ ls
lappy:restful_authentication bsmith$

Yikes! The directory is there, but the contents are missing! I don’t know if this is a problem with the way I added restful auth to my local git repo, or if this is an issue with github. I noticed this when a production deployment was failing saying “uninitialized constant User::Authentication (NameError)” as if restful auth was no where to be found.

It seems less than intuitive to say the least. If anyone knows what’s going on here, leave me a comment please! Otherwise, my fix was to clone restful auth, then remove its git directory. This allowed me to push to github exactly what my local copy contained.


Sep 25 2009

opteka professional wrist grip strap review

Opteka Professional Wrist Grip Strap (2)

I bought this strap to use with my 40D. I was shooting a lot of bouldering competitions and was playing with holding a remote flash in one hand and the camera with the other. I got some great shots, but the trouble was, I couldn’t really operate the camera with one hand. For example, after shooting a couple of frames, I would want to switch to playback mode and review the images. I found I couldn’t press the “play” button with the hand holding the camera. So I was left juggling the camera and the flash.

I thought that with this strap, I would be able to completely hold and operate the camera with one hand. Unfortunately when you have your hand in the strap and the camera is completely hanging off one hand, you CANNOT reach any of the buttons. You can BARELY reach the shutter release button. The problem is the camera hangs down, leaving your thumb way above any of the buttons. If you want to press any of the buttons on the camera, you need to hold it with your other hand.

Opteka Professional Wrist Grip Strap (6)

As you can see, none of my fingers are anywhere close to the buttons they need to reach! The only way to use the camera, is the same way you would with any other strap: hold the grip, and use both hands.

Once I came to the realization that this strap was nothing special, I immediately removed it and went back to using the stock strap that came with the camera :(

Here’s some more pictures for anyone who’s interested:

Opteka Professional Wrist Grip Strap (5)

Opteka Professional Wrist Grip Strap (4)

Opteka Professional Wrist Grip Strap (3)


Dec 16 2008

4th generation ipod nano charging

Dear Apple,
Thank you for releasing a super cool new ipod nano. It looks and feels super sweet. I just have one question: why the fuck did you have to change the way it charges? You have just made your new ipod incompatible with the huge collection of ipod accessories currently on the market. You should have packaged it with a jar a vaseline to ease the pain of the ass raping.
Love, Ben

So it turns out that the new 4th generation iPod Nano changed the way it charges. I’m not exactly sure how, but according to the apple forums it’s something to do with “12V Firewire and 5V USB charging change of spec” and is not something that will be fixed via a simple software upgrade. If you’re in the same boat as me and are looking for a less anal-rape-version of repurchasing all your accessories that no longer work, check out the Scosche Charging Adapter. Now, I haven’t actually tested this thing out yet… I just ordered it. For 30 bucks I’m definitely giving it a shot, because I’m not gay.

UPDATE: It works! The only real complaint I have about it is it makes the iPod stick way out of the dock for iPod speaker systems. I’m a little worried it’ll get bumped and something will snap off.


Dec 15 2008

i have your sock

My brother is HILARIOUS. He just posted this on craigslist. I’ve copied and pasted its entirety here for your enjoyment:

I have your sock – m4w – 21 (Virginia beach )
Reply to: pers-959033780@craigslist.org [?]
Date: 2008-12-15, 3:16PM EST

I had just drove home for a quick bite to each while my laundry was In the drier at the local laundry mat. To my surprize when I returned 30 minutes latter my mix of whites and darks were not dry and hot to the touch.

This was very odd to me since I have laundry down to a science. never has the large style drier failed to leave my weekly laundry dry and almost to hot to touch after 30 minutes. No worries though it was dry enough and I had things to do.

As I unloaded the drier I was shocked to find your colorfull sock in with my mix of laundry. Now I know it was not in the drier before as I check these thing ever since i ruined all my white shirts when they got dried with chap stick.

It all makes sense now why my weekly wash was not as dry as it should have been. I’m guessing you threw your laundy in with mine and while removing it the lone sock got left behind. I don’t blame you for putting your wash in with mine. I’m sure you were impressed with the handfull of drier sheets I had thrown In there.

After showing the sock to many of my friends, yes I currently have the missing sock in my pocket. I come to relize that you are female and must have cute small feet. I also know as I’m sure you do having a missing sock is just a pain. A colorfull sock like this can not be paired up with any run of the mill white sock.

Maybe you thought I was cute and left the sock behind so we could someday meet ? Maybe you want a friend to do laundy with ? Whatever the case may be I would love to buy you dinner and return your missing sock.

You’re a riot Jason. Hope you get that sock back to its owner.

Picture 099


Nov 4 2008

spaces + logitech mouse security hole

Opps…

(Click here if you don’t see the youtube video)

So, umm, don’t bind spaces to a button on your Logitech mouse.

UPDATE: It seems like you can actually interact with the spaces and applications to some limited extent. Dragging applications between spaces works.

UPDATE 2: You can also interact with the applications via the KEYBOARD in between the moment when you select a space and the moment when it finishes the zoom in animation! Immediately after selecting a space, hitting command+Q will CLOSE THE APPLICATION!!


Oct 17 2008

is soviet russia cupcakes grab you

fatten

Thanks for fattening us up for Thanksgiving Preston!


Oct 6 2008

the truth about belaying

belaying

Photo taken with my brand spanking new Canon 40D with a 50mm f/1.4 prime =)


Aug 28 2008

i am a badass mofo

I’m usually not one to talk about how awesome I am, or brag about any of my crazy adventures. Even if someone else starts tooting my horn, I’ll usually play it off with “nah… it wasn’t all that.” Well today I’m going to forget about that because according to the Up My Own Ass blog I am a badass mofo. Here’s a little quote from the post:

I wonder if he is one of those guys that you get into a fight with at a bar, and you know you are screwed after the first punch when you land it squarly in his face and he just starts laughing… and then you piss your pants.

The whole thing is hilarious and I ASSURE you it is completely and honestly 47% true. Click here to check out the whole post.


Aug 19 2008

what is a Reverse Bel-Air?

I love xkcd. This geeky comic almost never fails to bring a smile to my face. But every now and then the comic is so abstract and cryptic that I have no clue what they’re talking about. This strip in particular had me scratching my head until i found this post by Jenner on the xkcd forums:

Examples of Bel-air vs Reverse Bel-air is as so:

Bel-air:
I ate some pretty bad food at this really dingy diner last night and I think I may have gotten food poisoning. I’ve been up all night with a stomach ache and lets say nothing about what’s been going on below that. I just don’t understand /b/, what should I do? I mean, it wasn’t like I ate that much of it. I just got in one little fight and my mom got scared and said you’re moving in with your auntie and uncle in Bel-air.

Reverse Bel-air:
Now this is a story all about how my life got flip-turned upside down and I’d like to take a minute just sit right there I’ll tell you how I got arrested for soliciting a minor while just waiting for my nephew to get out of elementary school with my stereo blaring. It’s tragic really, serve and protect my butt.

As you can see, the Bel-air melds the song into the end of the conversation, and you suddenly realize they’re singing Fresh Prince. Whereas the reverse starts with Fresh Prince and then merges in the relevant conversation.


Aug 7 2008

how to get someone to stop parking in your parking spot

Let’s say you have an awesome parking spot. Maybe not as cool as the parking spots we have at OpenRain, but a good one nonetheless.

parking spot

What do you do if someone else jacks your spot? Leave them a nice, passive aggressive, note for them:
0721080945.jpg

Worked for me!