A while back I bought a CO2 sensor I could get readings off USB for. I finally deployed it in the office using a modified version of this and prometheus.
I’ll write up the code bit later but the graph of the first two days is interesting.
The initial, pretty flat bit is the weekend. And then people start coming in on Monday morning. One of the guys remembered to check it and then opened a window as we saw it was nearing 1,200 ppm.
A while back I had some ssl fun. Amusingly that fix worked for exactly one week.
The docker container that was being generated there was based on Debian wheezy. Apparently that was so old that not only was it deprecated, the next version seems to soon be deprecated too.
So I’ve spent the last two weekends feverishly porting it to Debian stretch. I’m not really a Debian user for most things so I don’t follow their release ecosystem.
When I was in school, I devoured school libraries. I read them all and there was some weird shit in some of them. In junior high school I remember several books in particular.
They were a series of conspiracy theories books - but written by someone who seems to have believed them and written like they were all totally true.
It seemed believable. And up till then, books were clearly fiction or not fiction.
I ended up reading about zram today and decided to give it a go. The install process on Ubuntu (and I assume Debian) is simple:
1 2 3 sudo apt install zram-config sudo systemctl start zram-config cat /proc/swaps You should now see several zram devices. They’ll have a higher priority than the disk based swap. This means that they’ll swap in and out cheaper with a slight cpu/memory cost.
A new angle on the tabs v spaces debate: how it affects your salary.
Personally I’m a tabs and spaces person, but I’m pretty relaxed about it.
My question before venturing off down the canyon to the right was whether to go barefoot or wear flip-flops. I was wonderfully unprepared for this adventure.
However I was convinced by wiser people - my girlfriend, sister, dad, essentially everyone - that shoes would be wise. Though based on the dirt ground into the bottom of my t-shirt, perhaps wearing them on my feet was a mistake.
Around the time we’d reached the bottom my nephew had managed to get into some difficulty and got stuck on the opposite side of the river at the bottom of the canyon.
Sigh. There’s a modelines vulnerability in vim that’s rather simple to exploit. Thankfully there’s a simple workaround - just disable that functionality.
Add this to your ~/.vimrc and then it won’t affect you but you’ll get modelines back when fixed versions arrive. However there’s some question about the fix so might keep an eye out on this issue and adjust the if statement as appropriate.
1 2 3 4 5 6 7 8 9 " Disabled due to https://nvd.
This article is a bit wordy but get towards the end and there’s lots of new stuff in there. Really want to play with C-n and the thing with tabs and sessions looks interesting but lots of new keystrokes there.
Every now and then I skim through this till I find something I’m wrong about. I’ve read lists like this for years and always, every time, learned something new. An assumption I’d incorrectly made or something I’d read before that was wrong. I often promptly forget it, but over time some of it sticks.
The world’s a big ol’ place. A guy I worked with once made the following observation:
The text programs have been amusing, but this video shows the one I really want to port. I’m not generally a front-end dev, and this was about as close as I ever got to doing it.
Some things to background info about what’s there:
First, IIRC, the project was to demonstrate how to use two dimensional arrays. I obviously understood the concept of “feature creep” before I learned the term.
Some notes on the conversion:
My coding style was far less consistent back then and that makes it harder to read the code. In this first pass I’ve made one-line summaries of the code as I’ve ported them and my style back then has made some programs a bit unscrutible.
Indenting varied so following program flow is a bit harder. Pascal is not case-sensitive and my capitalisation varied which makes it hard to find variables and include files.
After my initial research I filed two bugs (35596 and 35597), decided to put graphics aside and tried getting non-graphics programs running.
And I’ve had good success so far. I’ve ported 15 so far.
The fpc compiler has various modes which includes a Turbo Pascal mode. However that’s somewhere around Turbo Pascal 7 - definitely not all the way back to version 3.01a like we were using.
This isn’t a huge stumbling block though.
I came across a bunch of code I wrote in high school. So I decided I could see if I could get the programs running again.
I have them running inside of DOSBox but I was wondering if I could get them running natively. And sure enough, there’s a Free Pascal project. It’s targeted at “newer” versions of Turbo Pascal than I used.
Amusingly I already hit an issue with the systems runtime library.
So after using Go to do the initial activity collection, I went a bit more old school for
extracting it from git repos directly. Note that this and the previous post use the data capabilities
baby! It’s not ideal, but this script only runs once so good enough.
The reason for this one-off extraction is because both gitlab and github
restrict the time period they save activity data (two years for gitlab, 90
days for github - though some gitlab instances hold more and some less).
Future activity recording will be done via the Go programs described
before; this just runs once-ish. If I find older code repos I’ll likely
add them to this.Read more
Added some activity graphs to this
( linked off my about page ). Currently
they just look at activity on a set of gitlab servers I use. I’m going
to try and add github later. And then maybe raid some other data sources.
Just a quick explanation of how I did it.Read more
[posted this on facebook originally, this is the start of a series on migrating off facebook]
I first joined facebook around a decade ago because someone told me there were other Kevin Lyda’s here and that just seemed wrong. And then, horrifyingly, I learned my 20 year high school reunion was happening.
Now, ten years on I’ve finally booked tickets so I can actually go to a high school reunion. horrors And I’m beginning to think about being on this site.
On cable channels you’ll find loads of “documentaries” breathlessly telling you about supervolcanoes and how Yellowstone is going to kill everyone. Possibly also involving aliens.
So it was nice to see this public lecture on supervolcanoes and what they actually are (and are not), their history in the Pacific northwest and the science behind it all. It’s an hour and a bit long and makes for a good listen on a lazy weekend morning.
I’ve converted code repos a number of times through my career. From cvs to subversion, from subversion to mercurial and git, from mercurial to git. However until the other day, I’d never converted from cvs to git directly.
In this case it was converting an old CVS repo I’d found in some old backup cdroms which were being tossed out.
It went well but there were a few hiccups. First there are a number of methods to do this.
My first attempt at Cheez-Its went ok, but they were
too dense. Looking at the official recipe I saw it called for yeast. So
I looked for a recipe that used yeast and found this one from
Serious Eats. As always I tweaked it a little. Currently on
step 5, so should be interesting to see how they turn out!Read more
Like quite a few Galway geeks it appears, I queued up early to see Avengers Endgame.
Queuing for Endgame This was taken around 10pm as we waited for the one past midnight showing. For once I walked in pretty unspoiled and it was well worth the wait. I can’t go into what I liked without spoilers but can say that I was surprised, I laughed a fair bit, I teared up and was just plain wowed in parts.