Brain Phrye

code cooking diy fiction personal photos politics reviews tools 


Wiping disks

I’m returning a server to a hoster. I generally trust them and have no reason to believe that they’d go snooping through my disk but it’s always nice to clean things up. There are a lot of tools for this: wipe, secure-delete and several others. But none really fit my use case. I was trying to clean up free space as I backed up and deleted personal data on the server. Read more

File systems are hard

Been bad at updating this but oddly inspired by another good file system article (there have been a lot of them lately). This one essentially covers what POSIX says and how file systems implement that and what developers don’t understand about that whole interaction. Link to the original article which I got to via this lwn post.

Retirement

Updates Some updates in mid-2016 based on feedback and conversations with people. A revisit in early-2019 based on research and conversations with people. [ originally from a facebook and linkedin post ] I posted this on facebook, but someone pointed out it might be better here. And since I’ve never really posted here [ LinkedIn ] I thought I would. Note that it mainly applies to people who work and live in Ireland, but there’s also general advice that applies to other places. Read more

Lasts

Firsts happen now. You know them the moment they happen. You run to them. They are cherished from creation and shared with wonder. “The first time…” starts a story even at the end.

Read more

File system semantics

As the number of filesystems - local and remote - and filesystem-like things increases, the subtle and not so subtle changes in semantics continue to grow. What’s the fastest way to copy a file varies even on local, POSIXy filesystems.

Today’s horrifying article…

I think the title of the article sums it up, Armed to the Milk Teeth, America’s Gun Toting Kids. Yeah, that’s a great idea.

A Year of Moshing

I’ve been using mosh for around a year now and find it very handy for interactive ssh sessions from my laptop. It’s even handy from desktops or servers if you have a spotty network connection. However, I have noticed one issue. You’ll get a buildup of mosh-server processes on the machine(s) you mosh into if your mosh sessions tend to end uncleanly - if the client mosh dies while not connected to the mosh server. Read more

Static analysis with autoconf

Static analysis is one way to root out more complex bugs in C and C++ programs. And clang offers a static code analyzer. To make use of it as an analyze target in an autoconfed project, just add this snippet to your Makefile.am. Put the filenames you want analyzed on the analyze_srcs line. If you have any local include dirs, just add them as -I flags to the clang lines. Read more

Heartbleed in comic form

This xkcd comic explains heartbleed in 6 easy panels. Nifty idea; anthropomorphising the heap as a thought balloon. Are you still there, server? It's me Margaret. 

OpenSSL malloc usage

Some info on how the OpenBSD libc’s malloc could have detected, neutered or reduced the impact of Heartbleed. Further info on OpenSSL’s broken free list implementation. Essentially, don’t implement your own memory handling routines; use the system ones or obvious alternatives.

Source code archeology

The Heartbleed OpenSSL bug has been in the news a lot. And like many security stories there have been a few conspiracy theories floating around. Since OpenSSL is open source software, anyone can view the hostory of the project and see how the bug came about. But it does require understanding some tools. In this post I hope to help explain them. Step 1: Find The OpenSSL Source. A good way to do this is to search for the project name and git or svn or hg. Read more


Realtime doxygen

One of the annoying things about doing docs in doxygen is forgetting to type make between edits and checking what it’s rendering like. Luckily there are inotify-tools which, when combined with a simple shell loop, let you rebuild your docs whenever their source files change. By the time I’d switched to the browser and refreshed it the docs had been rebuilt. Not exactly WYSIWG editting but it skips the “forget to run make” step which is annoyingly tedious. Read more

GitHub gh-pages, doxygen and autoconf

Recently I was working on a low level library which I wanted to add a dependent library to. For things like this I really wish they’d have better docs. So if I was going to contribute to the world of lower level libraries I was going to at least try to make some docs for it. First step was to pick a tool. In the end I went with doxygen which seems to integrate well with autoconf. Read more

Anonymous Pro font for coding

I use an awful lot of terminal windows. I’ve always tweaked my fonts to get the most number of terminals and still be readable. For a long time that was Anonymous, but appears that the original author of that font has made a new one with some nice tweaks. Note that this font works just fine on both Linux and OS X. Anonymous Pro in Action 

Some web development links

First a link on how to track website visitors without using cookies. A quick tutorial on how to use curl to do a host of web requests. Very useful for testing REST APIs from the shell.