Note to myself that the stream URL for iTunes for Radio Heartland is http://radioheartland.stream.publicradio.org/radioheartland.aac
Over the last few years I have done a lot of development against Elasticsearch, especially using the Ruby libraries. The Elasticsearch::DSL is very powerful, but anything beyond a simple query can take hours of debugging to get the syntax just right. I always learn the hard way that it is better to handcraft the JSON first to get the logic correct, and then translate it to the Ruby DSL code.
I don’t do it often enough to remember, so after my latest struggle with ES, I thought it useful to document.
The curl command is:
curl -X POST localhost:9200/myindex/_search \ -H 'Content-Type: application/json' -s \ -d '@q-test.json' | json_xs | jq .hits.total
q-test.json is a file with the DSL JSON.
Just finished my last day at 18F. Dropped off my #FedEmployeeInABox at UPS. Feeling all the feelings right now, but mostly gratitude for the opportunity to use my technical skills to benefit so many people.
I wrote this Medium essay about my experience.
[This is a letter I just sent to the New York Times magazine editor. They won’t print it, so I am posting it here.]
I was not surprised to read about Bart Campolo’s move to secular humanism, nor that the evangelical community “has barely noticed.” American evangelicalism has always been less about what you believe and more about how you believe. Evangelical theology functions more as a shibboleth than an orthodoxy.
Bart’s father knew this. I will always remember hearing Tony preach 25 years ago in my midwestern college chapel service. In the heat of his sermon he would say the word “shit” and observe immediately that we were more disturbed by hearing that word than by the poverty and hopelessness he was describing. Words signify which camp we belong to as much as anything.
Those of us who leave the religious traditions of our childhoods don’t so easily leave the psychological patterns those traditions imprint. The toilet paper sticks to your shoe even after the bathroom door swings shut. Noticing that about yourself, and freeing yourself from the endless repetition, is a lifetime’s work. I’m glad if Bart has found a certain relief in his new belief system. He still smells like an evangelical to me.
I’ve realized this many years ago, about my attraction to computer programming:
The world, which consists of analog phenomena infinite and unknowable, is reduced to the repeatable and the discrete.
Problem is, the world cannot be mapped entirely to a technical model, nor should it be. My career-long ambivalence about digital technology hinges on that core belief.
After a decade of the same non-responsive layout for this site, I have paid off some technical debt to myself. The blog is now on WordPress with a clean mobile-friendly style. The server has been upgraded from CentOS 5 to CentOS 7. And thanks to the good folks at letsencrypt.org, every site hosted on this server has been updated to support SSL (HTTPS).
# pretty print html to terminal puts Nokogiri::HTML(page.body).to_xhtml(indent: 3)
My family are avid public library patrons. I’d estimate that in the three years we’ve been in Lawrence we’ve checked out well over 1000 items amongst the five of us.
It’s been up to me to manage the due notices and pay the inevitable overdue fines. I think we’ve only had to pay to replace a handful of items, which is a pretty decent success rate given who my children are. Still, it’s been fairly tedious to juggle five library cards, five accounts, log in to the site to check and renew each as needed.
The Lawrence Public Library website greatly improved when they switched to the bibliocommons platform. I finally got around to writing a command-line library management tool to aggregate all five accounts into a single report and automatically renew any that are coming due.
% perl my-toolbox/lfk-library --renew --all
No more click-click-click and putting-off-till-its-too-late-and-whoops-we-have-a-fine.