Posts Tagged ‘Gnutiken’

Prepending text to a bunch of files

Thursday, June 10th, 2010

Say you have a project, say it is LaTeX, and that you intent to publish the final product.

Say that you have an upcoming deadline, and you wish the publication to be printed and available at a rather fine conference.

Say that you enter that project late in the game, and (stupidly) don’t spend a thought on the source code license, because there are not much time left until the deadline.

And then, after the deadline, say that there are some people interested in said source code. Since the final product was published under a nice license, the intent was of course always to have the source code that way as well, it just… kindof, slipped between the chairs.

So there we are, source code without any license notice of any kind. What do?

(Obviously the answer is to get a license header into the files)

Say you are lazy. Manually adding those two lines of license data, even if only to a meager count of 15 files, is a chore you’d rather avoid.

You might start experimenting with cat for instance something along the lines of

cat license somefile > somefile

You realize that that approach is full of fail, but, if you’re in luck, you work in a pretty cool place, and get to have pretty cool work buddies. Work buddies which are pretty good at wielding bash, and concoct stuff like:

for f in *.tex; do (cat license; cat $f) > ${f}.new; mv ${f}.new $f; done

The result, finally, speaks for itself.

Gnutiken — Small step forward

Tuesday, September 15th, 2009

By no means a significant step, but at the same time still somewhat commemorable, we could all surf the intarwebs today in Gnutiken. This due to a newly acquired wireless router with the capability to get its connection from a 3G modem (I’m pretty sure it’s a ZyXEL NBG412W3G)

So, without further ado, some pictures:

Andreas having an xkcd #303 moment

Andreas having an xkcd #303 moment

Andreas indulge me while I goof off, I guess there was nothing else for him to do while waiting for the compiler to do its thing.


My webcam watching Andreas webcam watching my webcam watching...

My webcam watching Andreas webcam watching my webcam watching...

Andreas was however kind enough to participate in my mad ravings, and we came up with this.


Hard at work in the face of goofiness

Hard at work in the face of goofiness

While Andreas and I are goofing around, Stian is hard at work configuring the wireless router. Moments later we are all online and I make this “valuable” contribution to the world.


And that’s about it. Oh yeah, another reason why syndaemon is nice in theory but impractical on a laptop. Consider Firefox, and having no mouse, and whishing to open a link in a new tab. I personally prefer Ctrl + left click. But as soon as you hit the Ctrl button, guess what, keyboard has been touched, and that disables the touchpad (left mouse button)… ouch.

Update: Confirmed Wireless Router name, and updated name of manufacturer.

Gnutiknick 1800 Härlanda Tjärn

Wednesday, June 24th, 2009

Vi som håller på med Gnutiken har beslutat oss för att senare idag (Torsdag) är ett ypperligt tillfälle ( och med tillräckligt kort varsel ;P ) för att samla ihop folk som kanske kan vara intresserade av Gnutiken, och ha en picknick i Härlanda Tjärn (Göteborg) runt 18 snåret.

Färdplan och Karta för när man väl är framme och måste börja navigera själv.

Plocka med er något gott att dricka och äta, och lite glatt humör så blir det perfekt :D