Saturday, January 19, 2013

Lunch table talk


Lewis: Walter, hurry up changing your clothes, or else Audrey's going to be here and she'll see your privates.

Dora: Yeah, and that would be really bad, because you're different genres.

... twelve seconds later ...

Walter waves his butt in the air, then says "sorry, fart."

Papa: Walter, that's not nice.

Walter: did you know, "sorry, fart" is a joke in India?

Papa: I did not know that.


Friday, September 30, 2011

RMySQL binary for Windows 7

I and my co-worker just had a heck of a time installing RMySQL on Windows 7.  Finally worked it out.  He & I did the same steps (we think) as each other, but mine succeeded & his failed.  So I built a binary for him, and figured I might as well post it here too.

  [ binary package ]

I used MySQL 5.5, with R 2.13.1.  I think you still have to install MySQL separately in order for this package to work.

Thursday, July 14, 2011

Where does a normal person keep their most-current generic .zshrc file?  I don't know, so I decided to put a copy of mine here.


######### process an Sweave file, using caching #########
function sweaveCache() {
    Rscript -e "library(cacheSweave); setCacheDir(getwd()); Sweave('$1.Rnw', driver = cacheSweaveDriver)" &&
    pdflatex --shell-escape $1.tex &&
    open $1.pdf
}

runit() {
    echo $* 1>&2
    $*
}


########## Maven stuff ####################
export MAVEN_HOME=/usr/share/maven
function listMavenCompletions {
    reply=(cli:execute cli:execute-phase archetype:generate compile clean install test test-compile deploy package cobertura:cobertura jetty:run -Dmaven.test.skip=true -DarchetypeCatalog=http://tapestry.formos.com/maven-snapshot-repository -Dtest= `if [ -d ./src ] ; then find ./src -type f | grep -v svn | sed 's?.*/\([^/]*\)\..*?-Dtest=\1?' ; fi`);
}
compctl -K listMavenCompletions mvn

mvnrun() {
    runit mvn -q exec:java -Dexec.mainClass=$1 -Dexec.args="$*[2,-1]"
}
##############


########## Hadoop stuff ####################
export HADOOP_HOME=blah

export hdtracker=blah

doop() {
  if [[ $# < 1 ]]; then
      echo "Usage: doop " >&2
      return 1
  fi

  vars=(-Dfs.default.name=hdfs://$hdtracker/ -Dmapred.job.tracker=$hdtracker:8021)
  if [[ $1 == "jar" ]]; then
      runit hadoop $*[1,2] $vars $*[3,-1]
  else
      runit hadoop $1 $vars $*[2,-1]
  fi
}

alias doopstream="doop jar \$HADOOP_HOME/contrib/streaming/hadoop-*-streaming.jar"
##############

p4v=/Applications/Computer/p4v.app/Contents/MacOS/p4v

# Doesn''t work with absolute path
timelapse() {
    $p4v -cmd "annotate $PWD/$1" &
}
##############

prompt="[%U%m%u:%B%~%b] %% "
path=( /bin /etc /usr/bin /usr/etc /usr/sbin /sbin ~/bin /usr/local/bin ~/p4/tools/FileTools ~/p4/tools/perforce /usr/local/git/bin /usr/local/mysql/bin /usr/local/texlive/2009/bin/universal-darwin $HADOOP_HOME/bin . )

REPORTTIME=5

HISTSIZE=1000000000
SAVEHIST=1000000000
HISTFILE=~/.history

setopt extendedhistory
setopt incappendhistory

bindkey ^W kill-region

export P4CONFIG=.p4config
export P4DIFF="diff -u"
#export LC_ALL=C
export CVS_RSH=ssh
export PAGER=less
export EDITOR=emacs
export LESS=-eiMq

export DYLD_LIBRARY_PATH=blah
export http_proxy=blah


alias e=aquamacs
alias ls="ls -FG"
alias lsl="ls -alFG"
alias j=jobs
alias h=history
alias up='tar -zxvf'
alias top="top -u"
alias ql='quicklook -p'

alias ..="cd .."
alias ...="cd ../.."
alias ....="cd ../../.."
alias cds="cd ~/src"
alias cdd="cd ~/Downloads"
alias cdp="cd ~/p4"

alias cpan='perl -MCPAN -e shell'
alias findproc='ps auxww | grep'
alias disk='df -h | grep -v :'
alias mac2unix='perl -pi -e "s/\cM/\n/g"'
alias dos2unix='perl -pi -e "s/\cM//g"'
alias pert='perl -a -F/\\t/'

fpath=(~/.zfuncs $fpath)

reload_funcs() {
    local f
    f=(~/.zfuncs/*(.))
    unfunction $f:t
    autoload -U $f:t
}

Sunday, February 07, 2010

A funny thing happened tonight during the super bowl. The 3 kids & I were sitting there watching The Who during the halftime show, as they did their segue from one song to the next. They came to "Won't Get Fooled Again", and about 20 seconds into it, Lewis turns to me and says, "Dada, some bosses look the same as other bosses, right?"


Pop's jaw hits floor, because they haven't sung that part of the song yet. "Lewis, do you mean 'meet the new boss, same as the old boss'?" "No." "Um, what do you mean then?" "I don't know."

They must have sung that line and I hadn't noticed it. "Did you hear that in the song?" "No." Hrm.

All I can think of is that he must have heard that song somewhere, sometime, & that line stuck with him. Lewis' memory makes steel traps look like sieves; I wouldn't doubt that he heard the song at some point a year ago and filed it away.

Watch this kid, I'm serious.

Saturday, June 09, 2007

First post!

Some things that Dora has said lately.

Dora: "Daddy, what's that stuff in there?" Ken: "those are potstickers, I'm cooking them." Dora: "what's that stuff?" Ken: "that's oil." Dora: "oil... I just love oil."

Sheri: "Dora, what are you eating?" Dora: "just some candy." Sheri: "where did you get candy?" Dora: "just in my nose."

Apparently we don't give Dora enough candy.