jeremydw

Screen trick log

Move a window from one position to another.
Control-A, :number 1, Return
Published March 1, 2013, midnight

Mac OS X Trick Log

defaults write -g ApplePressAndHoldEnabled -bool false
Published Jan. 10, 2013, midnight

Idiot's guide to generating AuthSub tokens using curl

I've had to generate Google AuthSub tokens a bunch of times, and every time I have to re-read documentation on how to create these tokens. So here it is, step by step. How to generate a Google AuthSub Session token.

1. Log in to your Google account.

2. Visit this URL (you'll have to customize it a bit):

https://www.google.com/accounts/AuthSubRequest?next=http://nothing/&scope=[INSERT SCOPE HERE]&session=1&secure=0

3. Authorize the request, then copy the token from the destination page. Note that it might have URL-encoded characters that you will have to decode. You now have your request token.

Your request token will look something like this: 1/hABD5BM2Ryoh9DEFbq14QvhBKYTIaYFmmR27Db4A

4. Upgrade your request token to a session token:

curl -i -H 'Authorization: AuthSub token="1/hABD5BM2Ryoh9DEFbq14QvhBKYTIaYFmmR27Db4A"' https://www.google.com/accounts/AuthSubSessionToken

And the response will contain your AuthSub session token, ready for use in your web application.

Published Nov. 25, 2012, midnight

Chicken curry

  • 1 tablespoon butter
  • 2 tablespoons canola oil
  • 4 boneless, skinless chicken breast halves
  • 1 onion, chopped
  • 3 garlic cloves, minced
  • 2 tablespoons curry powder for mild taste, 3 for hot
  • 1/2 cup diced apple
  • 1/2 cup chopped dried apricots
  • 1/2 cup golden raisins
  • 1 14 1/2-ounce can chicken broth
  • Salt
  • Freshly cooked rice

Melt butter with oil in heavy large skillet over medium heat. Add chicken and brown on both sides, about 5 minutes. Transfer to plate. Add onion and garlic to skillet and sauté until translucent, about 6 minutes. Stir in curry powder. Return chicken to skillet. Add apple, apricots and raisins. Add enough broth to just cover mixture. Season with salt. Cover and simmer until chicken is just cooked through, about 10 minutes. Transfer chicken to platter. Keep warm. Continue simmering fruit mixture until fruit is tender and sauce thickens, about 5 minutes. Spoon sauce over chicken and serve with rice. Serves 4.

Published Nov. 11, 2012, midnight

Knoedel

You are referring to German potato dumplings or Knodel (o with an Umlaut). I make them with a mix called Pfanni and just follow the directions - even the Germans use a mix because to make them at home you have to grate raw potato which everyone says is too hard and these taste the same. These are very bland and only taste good with a gravy - so I make them with a pork roast. I can make this for you when you come home if you’d like and then you could watch me. Or I could send you the recipe. It is not hard to make. I also make this with sauerkraut that I cook with bacon to make it tasty.

Let me know if you’d like the recipes. And the Pfanni mix is sold at German deli’s or some specialty food stores. I get it here at a deli on Main St in Santa Monica.

Published Nov. 11, 2012, midnight

Cowart's recipes

Secret marinade.

  • onion, garlic, worchestshire, soy, vinegar, olive oil
  • mix to taste
  • let meat soak
  • grill
  • foodgasm

Romesco sauce.

  • roasted tomatoes, red bell papers, and sweet peppers
  • peeled almonds and hazelnuts
  • garlic
  • olive oil
  • salt and pepper
  • a little bit of red wine
  • vinegar
Published Nov. 1, 2012, midnight

How to open the Pioneer AVIC D1

Open the face of your AVIC D1 all the way, as if you were going to eject the DVD/CD navigation disc (but don’t do it).

Hold the reset button by moving the joystick (you will need a pen or paperclip to do it) and the navigation disc eject at the same time.

Now let go of the reset button.

Now let go of the DVD/CD navigation eject button. The screen will say “Press Reset”.

Press the joystick up two times.

Press the joystick down two times.

Published April 3, 2012, midnight

Girl advice from friends

  • Minh: tell her you like her
  • Minh: ask ccowart if im right first lol
  • Lilly: don't tell girls yer interested in about other girls yer interested in..lol
  • Ian: so, status check. got any good dates?
  • Jeremy: like girls or the fruit or calendar days?
  • Ian: girls
  • Jeremy: nope, HTML is my only lover.

A text message from Minh:

  • Jeremy it hurts my xhewja.. sdidn I drop my phone. Hard. I hoe nor buy me a new honbabu local y u bye
  • Minh> i watched new moon
  • Minh> only a horrible movie like this can beat box office of THE DARK KNIGHT
  • Minh> gg human race
Published Nov. 16, 2009, midnight

40,000 miles

>Today, my beloved car, a 2005 Acura RSX Type-S (color "vivid blue pearl") will hit 40,000 miles when I drive to the Golden Gate Bridge for a run. Unlike a handful of my friends (you know who you are), I haven't given my car a name. In fact, over the course of the past year, I've downright mistreated my car, but nonetheless I still appreciate this piece of machinery more than just about anything right now. Forget my laziness and mis-luck with public transportation -- I could live without a car in San Francisco, after all -- but the real reason I appreciate my car is because it's been there for me during significant moments during the last five years.
 
IMG_2654
Driving with Abe back to LA, 3000 miles
 
My 2002 Prius broke down. I destroyed my 2005 Scion tC in the rain. So I was in college at 2005, living in Christian Hall in Unit 1. My dad had business to take care of in Oakland, so he drove my RSX from Los Angeles to Berkeley, in order to give me my car.
 
I didn't know how to drive stick. So we drove on the 24 towards Walnut Creek and found a random church on a Saturday afternoon. This random church had a fantastic parking lot, where I learned. I learned for two hours. My dad wasn't the best stick driver, but his instruction got the job done. I was able to drive. A little. I drove us back to Berkeley, and stalled in the middle of College Ave. Some workmen laughed hysterically at me as I frantically tried to get my car out of the middle of the street.
 
I promised my dad I wouldn't drive until the next day, but the second he left I went out driving once again. I loved stick. It was, and still is, like driving a giant toy. Harish and Mandeep were very fascinated with my car, so I took us out driving. We got lost in Oakland.
 
A week later, I bought a navigation system (Pioneer AVIC D1) and installed it myself. I found a guy in Fremont with the necessary equipment (his name, "Mistah SparklezZZ" and found him through an RSX forum) whose tools I borrowed to do the installation. It took me a really long time, my hands got bloodied up from the hacking and sharp pieces in the dashboard, but there I had it: a self-installed nav system. Nice.
 
Some notable events in my car's life:
 
IMG_2497
March 2006: Road trip to LA with Alex, Abe, Luis, Mike
 
IMG_0600 IMG_0602 IMG_0594
July 2006: Moving the huge-ass sign in the morning
 
img_0114
July 2006: Driving through a fire
 
IMG_1222
November 2006: Camping out for the Wii with Minh
 
IMG_0679
February 2007: Driving with Sara to line dancing in Davis
 
Other notable moments not in photos:
  • Teaching Cyn, Victor, Jen, Monica how to drive stick.
  • Saving me from driving myself crazy after dealing with girl trouble at 2 in the morning.
  • Saving several girls from dealing with boy trouble at 2 in the morning.
  • Moving year after year, every year. I can fit more in that car than you would ever imagine.
Needless to say, my car is also now incredibly hurt.
  • The navigation system doesn't work anymore.
  • I scratched up the wheel well while parking in my city apartment's garage (a fire hydrant blocked the entrance).
  • While shopping at Safeway, four times I've returned to huge scratches in my car from careless people.
  • A Prius lost its bumper on the freeway. The Prius was right in front of me. I drove over the bumper and it tore off my sideskirt, which is now hanging loose.
  • My car got shot at.
A lot has changed in my life over the past five years. But my car is constant. That thing stays, and even if I have nowhere to go, my car will be there. Sappy, huh? Yeah. Good car.
Published Nov. 1, 2009, midnight

rsync and SSH keys

A simple way to do Rsync for backups.

rsync -avz -e ssh REMOTE_HOST:REMOTE_DIR LOCAL_BACKUP_DIR

SSH keys, enabling password-interactive-less sign on, are a brainlessly easy two-step process. If you type your password more than once a day for SSHing into machines, you’ll want to use SSH keys.

$ ssh-keygen -t rsa -b 2048
$ ssh REMOTE_HOST "cat >> .ssh/authorized_keys" < .ssh/id_rsa.pub

Two commands and no more typing in that password on every SSH connection.

Published Oct. 21, 2009, midnight