Thursday, July 23, 2009

Git commands I love to forget

Here are the most useful GIT commands that I *always* forget.

To push a local branch to your remote repository:

git push remote_repository_name branch_name

Eg: git push origin my_new_branch

Also:

Remove branch from repo.

git push {repo} :heads/{branch}

Ex: git push origin :somebranch
removes somebranch

This works for removing a tag as well git push origin :sometag

You might also want to check out git-publish-branch‘s ’-d’ option.

Thank you, GitHub, for these handy pages. But for me, these are the handiest of the handy.

Fixing an accidental merge (discarding local commits)

Let's say that you merged branch my_branch into master, when, in fact, you wanted to merge master into my_branch. Check git log:

commit 2a4b206e42360b812d6110c5ae9eeced96d99f0e
Merge: 4147391... dd525b5...
Author: baitisj
Date: Thu Jul 23 13:13:11 2009 -0700
Merge branch 'my_branch' of git@blablobbbla:somewhere/repository


commit 4147391a181a05f9754ddf8eecc6c4398dbb1d17
Author: baitisj
Date: Thu Jul 23 13:12:28 2009 -0700

latest

...
When you type git status, even though you did a single merge, git will say:

# On branch master
# Your branch is ahead of 'origin/master' by 20 commits.

Not to worry. Simply do:

git reset --hard 4147391a181a05f9754ddf8eecc6c4398dbb1d17

Poof! Your local repository has reverted to that version, and your merge has disappeared.

Friday, June 12, 2009

Swedish 101: My old notes. Beware: post is rated R

I was privileged to have a friend at Evolution Robotics who was from Sweden. I discovered that I really enjoy the sound of Swedish because hit has 10,000,000,000 vowel sounds -- Americans have about four or five (mawr if we'r edjamicated). Swedish also uses a lot of words that generally that translate to obscenities, which, in my opinion, is a most important criterion.

Every few days, he'd teach me a new Swedish word or phrase, and put a post-it note on my monitor. Eventually, I got good enough to string simple sentences together like, "The window is wobbly." (Det fönster är sladdrig.) Or, even better: "That woman has those big, wobbly windows." (Det brud har de stor, sladder fönstern.) Accompany this with an obscene gesture, and you'll be welcomed into most universities.

So, let the lessons begin! I have clearly marked the part of speech before each set of Swedish / English translations.

Things








det / den it
ditt / din your
de those
har have / has
tills until
han he
brud girl
Word connector thingies





ja yes
och and
för too
gillar like
"och" is pronounced "ock," and "gillar" is "jihlaar."

Being needlessly polite








Förlåt I'm sorry
Ursäkta mig Excuse me (mig == "may")
Jag skämta (de) bara I kidded only
Hur är läget? How is the position?
Det är lugnt. It is calm.
snubbe A cool guy.
skitstovel shitboot (jerk).
Incidentally, "skit" is pronounced like "wheat." "sk" is my favorite Swedish digraph (so far). It is also one of Sweden's favorite digraphs.

Getting around town










fönster window
Varför? Why?
vad? How?/What?
var? Where?
fan fuck/damn
skit shit
skit fan! WOW!!!!
sjysst nice
skit sjysst very nice
"sj" is similar to "sk" in pronunciation. As far as I remember, "sjysst" is pronounced kind of like "hyst," similar to the first syllable of "hysterectomy." (Incidentally, hysterectomy and hysteria share the same root word. Don't tell the womyn.)

Descriptive terms












hård hard
styv hard (penis)
sladder wobbly
sladdrig wobbly
sladdrar is wobbling
stor big
liten small
jävligt very
full drunk
ful ugly
fet fat
Apparently "stor" is pronounced "stoor."
My notes also say: "fiet" Oike (oilce?) fiat. I wish I could read my writing. Continuing.

Common greeting phrases








Be! Beg!
ber begs
bad begged
Be om nåd, svenne! Beg about mercy, swede!
I helvete heller! In hell either/neither (like HELL!)
Det ska du skita i! It shall you shit in! (None of your business)
jävla skit! fucking shit!

Drinking and dating





sug suck
Sup skallen i bitar! Drink the head to (in) pieces!
Rattan mein kuk! Drive my dick!
Rattan mein titten Drive my breasts!
The last two phrases, if you say them, will make sense to no one.

Holidays
Unfortunately, I don't have the real Swedish spelling of the following phrase. It is presented in a pseudo-phonetic English:

Ah-preel, Ah-preel, din duma sill, yawg kun loorah day vart yawg veal-eh.
means, "April, april, you stupid herring. I can trick any way I will."

And finally, my first Swedish phrase:
Loora kawka means quadriceps cookie. This refers to what happens if you hit the upper part of your leg really hard.

Thursday, June 11, 2009

Interesting tidbit about bacterial infections...

My mother has always told me that the flu seemed to be worse when she was growing up in California (now, she lives in Montana.) I can vouch for the effectiveness of the little flu germs down here. They seem to be a lot more potent; a few years ago, a flu kept me bedridden for over five days. That was horrible. Today, I saw a little anecdote while reading a Science Blog article about having sex in the summer:

"A study released last fall by Oregon State University found that summer is a bad time for bacterial infections in general, with serious infections caused by bacteria up as much as 17 percent with every 10-degree increase in seasonal air temperature."

I'm willing to bet that a similar statistic applies to geographical temperatures, as well.

Incidentally, the rest of the article seemed like common-sense stuff and wasn't particularly noteworthy; e.g., steeping in the hot tub bad for fertility, E. coli lives in water and is bad, etc, etc.

Monday, June 8, 2009

Beer Weekend: Koningshoeven Quadrupel

Since my last entry was about beer, I figured I'd contribute another article about... beer :)

My sweetheart and I will occasionally visit Lucky Baldwin's in Pasadena; I was first introduced to Belgian-style ale by my friend "Yozhik" at this location. As such, the pub has a warm place in my heart, despite the fact that the woman's bathroom is apparently not terribly hygienic.

I try to visit Lucky Baldwin's to experience new Lambic ales, as they have a remarkable selection that they keep on tap. I ordered several beers for my friends to enjoy, and was dismayed to find out that Lucky Baldwin's was out of several of our old favorites (Sarah enjoyes Wittekerke Rosé on tap), and was out of Koningshoeven Quadrupel (I have never sampled a quadruple-fermented Belgian-style before). Side note: Wittekerke Rosé, out of the bottle or can, is HORRIBLE. When we tried it on tap at Lucky's, it was GREAT (albeit sweet, like Lindemann's). When we bought it at Beverages and More, it was ATROCIOUS, and tasted horribly artificial.

Fortunately, I learned that a certain 7-Eleven at 52nd street and Figueroa in Highland Park stocks a peculiarly large selection of Belgian ales (supposedly, the owner of the store loves Belgian). I lived in Highland Park for about a year, and had always passed this store by due to its apparent rough character. How sad that I didn't know what was hiding in the back, near the beer cooler! After church, Sarah and I came by for a visit. And there it was: Koningshoeven Quadrupel, next to an Alaskan Brewing Co. smoked porter that was not available at Lucky's. I bought both.

Koningshoeven Quadrupel is wonderful. The taste is definitely complex, with an immediately raisiny flavor. Next, a sweet alcohol, and finally, a subtle and complicated malt of rum or cherry. This is followed by a subtle old-cellar aftertaste that I enjoy immensely. The flavor is distinctive and strong enough to remind me of good double-fermented beers that I have had in the past, but with subtle spices and the "old basement" flavor. I find that the beer is on the sweet side, however.

Highly recommended.

Thursday, June 4, 2009

Highly recommended: Brother David’s Double

One of the perks of living in San Rafael is that this small town has a disproportionate amount of wealth. As a result, I get to peruse "specialty" items in the local liquor market. The best I have found so far: Brother David’s Double Abbey-style ale, produced by Anderson Valley Brewing Company.

I submitted the following comment on their website:
Absolutely delicious. After trying the excellent Triple, I found your Double to be simply amazing: a delicious beer that has a sweet, complicated flavor and wonderful aroma. The muted hoppiness of this this beer compliments the hint of spice. The Double easily surpasses a certain well-known beer by Gulden as my favorite Belgian-style ale.
At over $6.00 per bottle, this isn't something that you should purchase if you are an undertaster. The flavor is fantastic. Highly recommended.

This comment posted after drinking 1 pt 6 fl oz of 9% abv liquid happy. :-)

Wednesday, May 27, 2009

Moving ZFS root filesystem from one computer to another

A few weeks ago, I decided to move the drives in my OpenSolaris (NexentaCP 1.0.1) box from one computer into another computer with slightly different hardware. The old machine used an Intel ICH6 SATA controller; the new box uses an inexpensive SIL3124-based four-port PCI controller card.

GRUB seemed to load fine, and was able to find and load the kernel (unix) and boot_archive files. However, Nexenta didn't boot: the kernel flashed an error message and immediately rebooted the system. After I added the -kv kernel debug option in GRUB, I was able to read the error message:
panic: cannot mount root path /ramdisk:a
After a great deal of effort, I finally figured out the solution. The problem was that the zpool.cache file inside of boot_archive was telling the Solaris kernel to look for the root filesystem at the wrong place. Booting from the Nexenta CD in rescue mode, mounting the root filesystem, and executing bootadm update-archive -R wasn't enough, because the zpool.cache file was never refreshed.

The solution, kind reader: if you move your ZFS root filesystem from one box to another, boot a Solaris "rescue" cd (I just use the NexentaCP 1.0.1 install CD), import your root filesystem, and manually freshen the zpool.cache file. Then update your boot archive using bootadm. On Nexenta, the root filesystem is labeled <<syspool/rootfs-nmu-XXX>>, where XXX corresponds to an apt-cloned version of the root filesystem. Here are the steps that I used, once I booted into the Nexenta installer and pressed the F3 key for the shell:
# mkdir /tmp/mnt

# zpool import -f syspool

# mount -F zfs syspool/rootfs-nmu-002 /tmp/mnt

# cp /etc/zfs/zpool.cache /tmp/mnt/etc/zfs/zpool.cache

# bootadm update-archive -R /tmp/mnt

Creating boot_archive for /tmp/mnt
updating /tmp/mnt/platform/i86pc/boot_archive

# umount /tmp/mnt

# reboot
... and... voila! system works again.

I've also noticed that NexentaCP 2 doesn't seem to want to boot if I have a SIL3124 card installed in the machine; this looks like a more recent bug in the latest OpenSolaris; however, NexentaCP 1.0.1 works just fine with the card.

Saturday, April 4, 2009

FrogHat


FrogHat, originally uploaded by baitisj.

Dictator Ted


Dictator Ted, originally uploaded by baitisj.

Captions needed for this one. I think Hong is secretly plotting.

Wednesday, April 1, 2009

P1010358


P1010358, originally uploaded by baitisj.

Sarah's Dad

P1010405


P1010405, originally uploaded by baitisj.

Santa Monica Peer!

Gina Hollywood - P1010432


Gina Hollywood - P1010432, originally uploaded by baitisj.

Gina visits the Hollywood & Highland center.

P1010533


P1010533, originally uploaded by baitisj.

GDW will ensure all wedding vows are enforced.

RiffWedding II - P1010536


RiffWedding II - P1010536, originally uploaded by baitisj.

RiffWedding I - P1010537


RiffWedding I - P1010537, originally uploaded by baitisj.

Ted got Wed!

Thursday, March 19, 2009

I no longer trust Yahoo! mail

This morning, I signed into Yahoo! mail. On a whim, I checked the contents of my "Important" folder.

I found no messages inside.

This is not the first time that I have caught mail messages disappearing from my Yahoo! account. Furthermore, this is the second time that the same message has disappeared.

Last time it happened, I asked my roommate to re-forward the message from his GMail account. On a whim, I created a separate folder, "Important," intended to contain that particular message.

And indeed, the message has disappeared -- again. This cannot be coincidence, I think to myself. Time for me to download all my messages through the POP service and figure out where to go from here.

What scares me, in particular, is that the message contains information that I would never send through plaintext email. In other words, the email message could have value to an unscrupulous third party.

I pay Yahoo $20 per year for their service. As it is a paid service, I have higher expectations for security and privacy; however, I have lost all confidence that my information is private, secure, and won't be lost. I think it's time for me to be a lot more careful about my own personal data.

Database errors? Hackers? Sleepwalking baitisj browsing email and clicking the 'delete' button? Or simply paranoia?


Goodbye, Yahoo. You were convenient; I should have left you as soon as you turned over someone's personal information to the Chinese government.