Category Archives: wordpress

UNIX Tip of the day: Strange behavior editing PHP files with vim

I have been struggling with this weird behavior in vim for the last month or so. I just re-joined Automattic in September. I have been using vim on many different computers and environments (linux, max, cygwin) for over 15 years, and I have never experienced this before. I only seem to have this issue when […]

Posted in wordpress | Leave a comment

Git tip – restoring “lost” commits

I ran into a git issue today where I thought I was ready to push a recent commit, and the push failed, saying that I was in the middle of a rebase. I don’t remember starting a rebase, but maybe I did. I tried git rebase –continue, but that didn’t work, so then I tried […]

Posted in wordpress | Comments Off on Git tip – restoring “lost” commits

UNIX tip of the day: two file processing with AWK

I recently came across some AWK code from a work colleague that I did not understand at all awk -F’\t’ -v OFS=’\t’ ‘FNR==NR{a[$1]=$1;next};$1 in a{print $1,$2,$3}’ file1 file2 I usually like to understand code instead of blindly copying and pasting, so I did a little research into what this was doing. Searching for “awk FNR […]

Posted in wordpress | Comments Off on UNIX tip of the day: two file processing with AWK

UNIX tip of the day – trap EXIT

I was reading a shell script today and came across the trap command, which I was not aware of. Some googling led me to this article: How “Exit Traps” Can Make Your Bash Scripts Way MoreRobust And Reliable , which has a really nice explanation. Basically, trap acts sort of like a finally block in […]

Posted in wordpress | Comments Off on UNIX tip of the day – trap EXIT

Exploring querying parquet with Hive, Impala, and Spark

At Automattic, we have a lot of data from WordPress.com, our flagship product. We have over 90 million users, and 100 million blogs. Our data team is constantly analyzing our data to discover how we can better serve our users. In 2015, one of our big focuses has been to improve the new user experience. […]

Posted in wordpress | Tagged , , , , , | Comments Off on Exploring querying parquet with Hive, Impala, and Spark