Category Archives: code

Continuous file ranges with bash

After the downtime and later recovery, DAS is finally back with a changed business model. Previous subscribers like me have access to content until some deadline, after which seasons must be purchased.

Having learned quite a bit from grb’s excellent screencasts, I wanted to archive them so that I could revisit and even discover anything I’d missed. I already had some of the files downloaded so I wanted to download only the ones that were missing.

Continue reading

Advertisements

Working around problems with xargs

Having access to sites that provide books as pdf per chapter, I often just want to download all of the pdf files and concatenate them with pdftk. All the sites I’ve come across have had rather obscure naming strategies for the pdf files; you cannot just pdftk *.pdf concat output ready.pdf.

Continue reading

sed -Ee

Just quickly writing this down: Not sure why it isn’t on sed(1) but from now on I’ll be using sed -Ee ‘…’ for all my stream edits. For example listing host ssh keys somewhat prettied up:

(for i in /etc/ssh/ssh_host*pub; do ssh-keygen -lf $i; done) \
  | sed -e 's/\([0-9]\+\)\s\+\(\S\+\)\s*\S\+\s*(\(\S\+\))/\2 (\3-\1)/'

Same with -E:

(for i in /etc/ssh/ssh_host*pub; do ssh-keygen -lf $i; done) \
  | sed -Ee 's/([0-9]+)\s+(\S+)\s*\S+\s*\((\S+)\)/\2 (\3-\1)/'

It’s so convinient that it makes you want to write even more sed expressions!

Reading JAX Magazine #1

Not too long ago I managed to read the previous issue of jaxenter.com’s magazine. The magazine was called Java Tech Journal but it has now been re-branded as JAX Magazine. Next after a few opinions I’ll be taking a peek at the contents of this issue and writing this as I scroll.

Continue reading

A lot of stuff that just makes sense

While writing my yesterday’s post I (again) came across destroyallsoftware.com. After (again) watching the free material on that site I (finally) decided to subscribe his screencasts. I was mostly interested in the bash stuff.

Continue reading

Ranting about a rant

First I stumble upon a rant. I often read these, write a long comment about all their faults or misunderstandings leading to their outburst of hatred, but this time it turned out that the site hosting the article has a botched comment form. It tries to load WYSIWYG editor which in turn hides the original <textarea>. Sigh.

Continue reading

Waiting for Java 8: JSR-310, the threeten

For Java 7 the Fork/Join looked created, but I guess no one was eager to use it as Lambdas were still missing. Also interesting was the new filesystem API, which I’m yet to try out. I was really disappointed when JSR-310 was not included in Java 7. The current JDK time/date API’s are a shame. I thought to take a look at what’s the status of JSR-310.

Continue reading

More thoughts on Java Tech Journal

Ha, in my last post I said I was throwing jaxenter.com’s emails usually to trash and I’ve missed that they seem to release their journal monthly .. not sure how of they release it, their issue pages don’t have any dates on them. Oops.

I’m writing this as I go with the journal #21.

Continue reading

Maven release plugin and skipping tests

Shortblog: I never seem to remember this. I’d rather not have maven release plugin run any tests, so:

-Darguments="-DskipTests=true"

Everyone please, no more talking about salting hashes

After LinkedIn etc. sites had recently their hashes exposed everyone got busy writing YASH (Yet Another Salted Hashes) -articles. This is 2012, you should not be talking about salting SHA-1 hashes.

Why shouldn’t you be talking about salting? Because intelligent people have constructed methods which when compared to salting make it look like a case of plaintext vs. md5.
Continue reading