robfelty.com


Using awk to sum rows of numbers

Posted in bash, linux, UNIX

Quarter note = 11142013 robfelty
Treble clef 4/4 Time
I have a script which takes a tab-delmited file for regression tests, and converts it xml. I want to do a sanity check, to make sure that the number of utterances in my xml files matches the number in the tab-delimited.txt file. I can do this in 2 lines in UNIX robert_felty$ wc -l samples2.txt 72148 samples2.txt robert_felty$ find . -name '*.xml' | xargs grep -c " (Read more)

Small fix for article class in plasTeX

Posted in latex, python

Quarter note = 01172013 robfelty
Treble clef 4/4 Time
I recently found a small error in plasTeX, the program I like to use to convert latex to html. Unfortunately, it looks like it is not being actively developed anymore, but since it is open-source, and it is written in python, which I know, I was able to figure out the issue in not too long. When running plasTeX, I was getting this error: (Read more)

Em dash in LaTeX

Posted in latex

Quarter note = 11112011 robfelty
Treble clef 4/4 Time
My friend Daniel Reeves was recently discussing different ways to typeset em dashes. Here is the way I like to do it in LaTeX. \documentclass{minimal} %this sets up a new command \dash, which makes nice dashes \DeclareRobustCommand\dash{% \unskip\nobreak\thinspace\textemdash\thinspace\ignorespaces} \begin{document} Let's test out several different variants on making an em dash using the \LaTeX typesetting system --- this one uses \verb|---| with spaces around it Let's test out several different variants on making an em dash using the \LaTeX typesetting system---this […] (Read more)

Vetting vignetting

Posted in linux, photography

Quarter note = 09282011 robfelty
Treble clef 4/4 Time
We recently got some family portraits taken at JCPenney. I think they turned out very nicely. They had a bunch of different effects that they could apply. While we were at the studio, I really liked the way that the vignetting effect brought out our faces. However, after investigating the full set (we bought the digital images), I decided I didn’t like the vignetting, because it was actually making my face a bit dark in one shot. Then I decided […] (Read more)

UNIX/Linux permissions and groups – getent

Posted in linux

Quarter note = 09062011 robfelty
Treble clef 4/4 Time
I keep forgetting this command, so I writing it here so I know where to find it. Getent will list information about users and groups on a UNIX/Linux system, including NIS and LDAP users, which is crucial networks with multiple nodes. For example to list information about a user named robert_felty, you can do: $ getent passwd robert_felty robert_felty:$1$iPJ.svD/$ce77I/wxh129FLt2Z7UOm.:5440:112:Robert Felty:/home/robert_felty:/bin/bash