March 23, 2015

How to Calculate Readability of Text

Readability is defined as the ease with which a written text can be understood by a reader. There are a bunch of metrics for calculating the readability of a piece, many of which are incorporated into koRpus. To use this, read in a text file from your local drive in the following manner: R will then spit out something looking like this:

March 21, 2015

How to Run Sirc on FreeBSD

I'm a big fan of small. My preferred IRC client is only 59k for instance (that's right kilobytes, not megabytes or gigabytes). I know most of the known world doesn't value minimalism, but I fixed the port on FreeBSD and have submitted a patch to fix it.

How to make Java Less Chatty

When I program, I like to have the logging up to the max. Others don't. The shell pipe below filters the logging messages out, leaving only the run output, output first:

% java -jar foo.jar

  .   ____          _            __ _ _g,
 /\\ / ___'_ __ _ _(_)_ __  __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
 \\/  ___)| |_)| | | | | || (_| |  ) ) ) )
  '  |____| .__|_| |_|_| |_\__, | / / / /
 =========|_|==============|___/=/_/_/_/
 :: Spring Boot ::        (v1.2.1.RELEASE)

Sending a new message.
Received  success!
And the magic incantation to remove all the extraneous messages is: mvn spring-boot:run | grep -v "`date +'%Y-%m-%d %H:%M'`" | grep -v '^\['; I do hope that makes your getting on with peers a lot easier.

March 19, 2015

How to Push K&L Wine Tastings

The code above formats the K&L local events page into an ATOM feed. K&L is among the largest wine shops in the country here in the Bay Area and features weekly wine tastings in every one of its stores.

March 11, 2015

How to get Post Titles in a Subreddit

I'm fairly up-front about the fact that I use reddit. This afternoon, though, I found a post asking for a way to extract subtitles to Excel. Well, kind user, your solution is below:

Sample run:

 % python reddit2csv.py --subreddit openbsd
Using OpenBGPD to distribute pf table updates to your servers [xpost from /r/sysadmin]
"Make httpd TLSv1.2-only by default. Some older browsers, like IE 10, will be incompatible with this change."
OpenBSD newbie // Strange behaviour with irssi
802.11a USB options
Keyboard doesn't work after resume on HP Elitebook 2560p with OpenBSD 5.6
LibreSSL 2.1.4
Summer of Code 2015 Project Ideas Announced
Errata for X Server Infoleak
The Security of OpenBSD: Milk or Wine? (2006)
Improving browser security
Network Shell?
Episode 078: From the Foundation (Part 2)
OpenBSD Foundation 2014/2015 News & Fundraising
BSDNow Episode 076: Time for a Change
s2k15 Hackathon Report: mpi@ on network stack SMP
OpenBSD Just Works
Jazz concert with OpenBSD synths
s2k15: Authenticated TLS 'constraints' in ntpd(8)
Build a workstation from parts, minimize dependence on binary blobs?
iwm driver, for Intel 7260 wifi cards, now in tree
Setting console font on raster display
Missing dependencies on -current?
Troubleshooting Libvirt/virtualmachinemanager (post install)
Is the official OpenBSD website open-source?

March 9, 2015

How to Launch Ubuntu EC2 Instances from the Command Line

The code below launches and populates an instance of the default type (m1.small, as of the publication date of this entry). Note, this is not eligible for the ‎free tier:

March 8, 2015

How to read Github commit Messages

I make pretty extensive use of hakkalogs to keep track of what I've done. It has gotten to the point where I'm finding it difficult to remember exactly what I did today in terms of accomplishments. But git does. And, so, why not script it:

Sample output from the script (for rubyonrails, a rather busy project, today, by any user:
Merge pull request #19257 from jvanbaarsen/patch-1

Rails 5.0 needs ruby 2.2.1 or higher
Rails 5.0 needs ruby 2.2.1 or higher

Since there was a bug in 2.2.0, the minimum ruby requirement is 2.2.1. See https://github.com/rails/rails/commit/8ed0b89b
[skip ci]