I wanted a way to serve up a set of .well-known paths, as easily as I could get away with, but keep it all alongside some other Kubernetes manifests.| nickcharlton.net
2024 sucked for various reasons, but when I’m not happy (over a long period of time especially), I find I start far more projects than I get close to finishing. I end up having far too many things in progress, where I’m (consciously, or unconsciously) trying to work on multiple things at the same time, continually thinking about what I’m not doing, being stuck on one project so others can’t proceed, or missing out on new and other interesting things because I’m too busy and stressed...| Nick Charlton
I’m a fan of serial consoles for out-of-band access, since having used them a lot for network equipment. Recently, I was trying to figure out a graphics incompatibility on a system using Wayland on Debian and wanted to set up a serial console to try to stop part of the debugging process being so painful. Since systemd has rolled out to Debian though, there are a lot of outdated articles, and now it’s quite a bit easier to get going. According to the Debian Wiki, we can now start a service...| Nick Charlton
The Dell Wyse 3040 is a little thin client device that’s surprisingly powerful and also very low power. I picked one up last year, new in box, for about £30 for a project. Unfortunately, getting Debian running on it is not so straightforward because it has a buggy EFI implementation which means that whilst you can complete the install, you can’t boot it afterwards.| nickcharlton.net
Nearly 8 years after cutting my first release of Administrate, we’re nearly at the point of releasing v1, which has been my big open source focus all year! We’re close to releasing Administrate v1. We’d love it if you could try it out! See on Giant Robots| Nick Charlton
Well over a year ago, we worked on a project that used barcode scanners. Knowing that they’re just human interface devices (keyboards) in most cases (and/or can be configured as such), it makes them quite easy to work with in a typical browser-based testing framework. But putting these two things together wasn’t very clear to most of my colleagues (and probably not to most people either!). My colleague Silumesii took the time to write it up (we started working on this together, so I’ve ...| Nick Charlton
We’ve been working recently on coming together as maintainers at work, trying to share what we’ve been getting up to and seeing how we can help each other out. Then we thought about sharing our notes in public, and now they’re available for everyone. Looking for an opportunity to contribute to Open Source? Look no more. We’ve made our monthly internal Open Source Maintainers Sync notes public to facilitate getting more people into contributing to Open Source. See it on Giant Robots| Nick Charlton
Today, I cut the first release (v1.0.0) and published diff-check to GitHub Marketplace. diff-check came out of seeing a common pattern of seeing side effects when another automated process would run, creating more work which wouldn’t be seen at the time. It was really common when I was working on React Native projects (if you upgrade an npm dependency, you’ll often get a change in the Podfile.lock that Dependabot wouldn’t know about), but less frequently in projects using Appraisal (ano...| Nick Charlton
A couple of weeks ago, Joel asked: Starting a new rails app is fun! But after setting my bespoke set of preferred gems and config for the N-hundred’th time I think it may be time for some sort of template/generator/whatever. Any tips? So, I mentioned the approach I’ve used several times recently, using git’s format-patch feature, but it really needs walking through to understand how this is done. Patches are how you sent commits over email, something still done on a lot of projects but ...| Nick Charlton
I maintain a set of virtual machine templates that use Packer. For VMware VMs, the workflow is to build them locally using the vmware-iso builder, then push to vSphere using the vsphere post-processor. The idea behind this approach is to be able to use the same templates for local VMs (which are exported as an ova archive) as those that end up on vSphere. Unfortunately, there’s some differences between VMware Workstation and vSphere that create some tricky problems like mismatched operating...| Nick Charlton
I was trying to setup a quick (…foreshadowing) VM to run a VPN on a host I use for a few VMs with KVM. But getting it setup was surprisingly painful until I tried the “nano” install image. As the host is headless, I wanted a disk image I could import on the host with Opnsense already installed to avoid trying to redirect VNC over the network, or something similarly daft. A serial terminal was ideal (and how virt-install and the rest of libvirt works nicest). Alas, I couldn’t get a ser...| Nick Charlton
Last year, I started to see a few common workflows that would create more work by those unaware or open yourself up to making annoying mistakes if you did, that I thought could be caught with just a little more automation. This was typically when Dependabot would go and bump a dependency that would have other implications: for example, if you bump a npm dependency in a React Native project, it might change the Podfile.lock in the iOS portion of the codebase, or if you bump a dependency used b...| Nick Charlton
I’ve been reconfiguring a router I built at the end of last year to be a transparent firewall (or filtering bridge) using Opnsense. On the router, I’ve got a Dell-branded Intel X520-DA2 NIC, along with some Flypro 10GBase-T SFP+ modules which I picked up on offer last year. But … they don’t work. Intel — like a lot of other vendors — restricts the SFP+ modules to those which have been approved, regardless of whether they may pose a problem and so you can’t just use any SFP+ mod...| Nick Charlton
If you’ve worked with pull requests on GitHub for a while — especially with Actions — you’re probably used to having a long list of checks, that you find yourself scrolling every time to find the failing one: The usual view of GitHub checks when you've got a lot, and one failingLast year, Ben and I started working on a user style sheet to stop you needing to scroll and instead show the whole section: After the user style sheet, with the scrolling area expanded to fit the amount of che...| Nick Charlton
I have a few Supermicro X10SDV-4C-TLN2F motherboards that I’ve been setting up to run VMware ESXi on. The first board was fine, but when setting up another I could never get ESXi to acquire an IP over DHCP. The hardware was happy the connection was valid, and both Debian 11 and Windows Server 2019 were fine …but not ESXi: A screenshot showing ESXi with 'waiting for DHCP'A screenshot showing the adaptors as disconnected.I’d been using a slightly older version of ESXi (7.0U3D/19482537), s...| Nick Charlton
1Password has a CLI tool that’s very helpful for integrating into things like setup scripts and handling development secrets more securely. Unfortunately, on Windows, there’s no installer. Instead, you’re prompted to extract an archive, create the destination directory and add it to your PATH. This is annoying once, impractical to do multiple times and enough of a hurdle for others to be quite a pain, especially when you want to keep up to date with the most recent version. I’m sure 1...| Nick Charlton
I have a Home Lab with a couple of devices for experiments and testing. It’s set up on a separate physical network — using a Ubiquiti EdgeRouter X — but I wanted to connect this to the outside world and get access to public IPs I could proxy to local services. A while ago, I started using Azure for other experiments (because I have a bunch of credits to use). I’ve also found the cost of the more basic virtual machines cheaper than other cloud providers. At the time of writing, a B1s ...| Nick Charlton
I’m now using Mastodon: @nick@nickcharlton.net. Some time ago, I stopped contributing on Twitter as much as possible. I was still obsessively scrolling and using it to keep up with stuff going on, but I was finding people elsewhere, ideally through subscribing to people’s blogs via RSS. I limited myself to occasionally liking tweets (I’d always used this as bookmarking for later and the occasional DM for meeting up with people at events, too). As Twitter seemed to be starting a terminal...| Nick Charlton
I haven’t been doing too much Rails recently, but I did do this and it’s worked out really well. It was one of those situations where you can go, “oh right! We can do this…” and put together an example in less than an hour which are always very satisfying. Adding site-wide configuration with a Rails model can be quite easy to do with Administrate. See on Giant Robots| Nick Charlton
Back in 2020, GitHub added profile READMEs. I jumped on it and created mine when they silently launched the feature but then did …nothing with it. As the profile README is implemented as a special repository which gets rendered on your profile page, I’d wanted to build something that would auto-update and show contributions after reading that Simon Willison had done the same. I was never going to remember to update these myself, but as it’s just a GitHub repo, we can use GitHub Actions ...| Nick Charlton
As I started to work from home at the beginning of the pandemic, I got an IKEA BEKANT sit/stand desk. It’s been great for my posture and managing the fatigue of being at a desk for a long time every day. My main frustration has always been that it doesn’t have a memory — you can only hold the up or down buttons to move it and so trying to get it to the same position is annoying enough to avoid doing it. Fortunately, someone reverse engineered the firmware and published a replacement wh...| Nick Charlton
I needed an HTTP server to test out a software integration on Windows. Nothing was quite basic enough to just echo out the responses, so I wrote one. See on Giant Robots| Nick Charlton
I’ve been jumping back into open source recently, plus doing a lot of technical writing for work, I released v0.17.0 of Administrate the other week, which catches up on a whole load of contributions after nearly a year, Next is going to be a big breaking change, as we remove a lot of dependencies (like datetime_picker_rails) and make the biggest change so far to how assets are handled. We’ll likely be removing Sass completely and moving to standard CSS, which I’m quite excited about, bu...| Nick Charlton
I’ve been using Windows a lot recently and have been quite enjoying it. Some things are new, but most are old and familiar. But after using a lot of shell aliases over the last decade of using Linux & macOS, I needed them to come over with me. I’ve been using PowerShell 7, inside Windows Terminal (and mostly VS Code as the editor), and so far have pulled over my Git aliases. If you’re trying to bring over your own, this should be enough to get you going. PowerShell has an equivalent pro...| Nick Charlton
A New Year always brings a new set of optimism, plans and possibilities for me and this year is no different, Last year was another rough one (who knew living through a pandemic would be extremely difficult, even if you never got sick), but we made it, A lovely Christmas and New Year, then back where I was previously; trying to get my head around Windows, C# and a lot of receipt printer minutiae, Later this year, I’m doing the Frontier 300, but I need to get my fitness well up from where it...| Nick Charlton
A busy couple of months or so, which so easily ends up breaking the habit of writing something regularly, It’s mostly been work, my current project — which involves building lots of different bits of software and some hardware integration — has been fairly intense recently, but I’ve also been learning to drive (which I picked up again after a 10 year hiatus), This has all lead to my previously delightfully minimalist one computer, one monitor and tidy desk setup to have another monito...| Nick Charlton
I’ve been using FeedWrangler and Reeder since Google Reader shutdown. All of these years they’ve continued to work really well. But I’ve wanted to move back to NetNewsWire since it was taken back over by Brent Simmons and made Open Source. NetNewsWire was always more of a “Mac app” than Reeder ever intended to be, which played around with new UI ideas and helped push along some of the more innovative patterns we see today. But two things always bugged me: It has no feed organisation...| Nick Charlton
I’ve spent the last few weekends doing a lot of woodworking. I set myself the goal this year of building much more for the garden and — mostly because of the weather, but also because everything takes far longer than you’d expect — I ended up finishing one of the three planters I’d wanted to build, This first one (pictured below) is for cucumbers: it’s a box with a built-in trellis (which is thick twine) which they grow up. Now I’m writing this, they’ve all reached the top and...| Nick Charlton
I’m doing a bit of spring cleaning around here, and I wanted to split the list of posts on the index into Week Notes and everything else. I differentiate Week Notes posts from others by tagging them with week-notes and filtering by these seemed easily enough. But I was wrong. In Jekyll, posts exist in a collection called site.posts, which you could pipe into a filter to change the list returned, so you could get a list of Week Notes posts by doing: {% assign posts=site.posts|where_exp: "ite...| Nick Charlton
A long weekend which didn’t quite go to plan: a slow (but necessary) Saturday, followed by a bad start to some wood working projects (nothing that bad though!), In the UK we had a public holiday and so this weekend was three days long. I usually like to use them for starting projects; in three days you can make some good progress. I’d planned to replace some table legs and build an indoor cucumber planter: a big box with a trellis built in for the plants to grow up, But I didn’t get ver...| Nick Charlton
Quite a gap since I last wrote one of these; I recently rotated off a tough project which was taking up all of my time. But now I’m on something new and then had a lovely week off! The Food Almanacvia John that’s a collection of seasonal recipes and stories, which in turn lead to picking up An Everlasting Meal which I last tried in 2013 and didn’t really get on with, but was reminded of again because of Alicia Kennedy’s newsletter which I always look forward to reading. As I read it t...| Nick Charlton
I just finished four sessions of physio: I’d been limping everywhere since before Christmas, but now I’m all back to running which after so much pain is excellent, Plus, starting the longer rides again as I start to build up the fitness for cycling again, but mostly so I can spend some time away from the concrete of London! It’s been very satisfying to get back into writing — more to come here, I’ve been working a bunch on converting some projects to GitHub Actions for CI: a few of ...| Nick Charlton
I use Drafts for capturing text (everything from quick notes to this blog post started there). I’ve been using Drafts for a year, and over that time, it’s become integral to my workflow. But I’d not done much to customise it to fit what I regularly do. I typically have a view that looks like this: Drafts Main window, showing the editor area with Action Bar at the bottomI use Flags to keep many notes at the top of the pile and Workspaces as a context (but typically show everything in the...| Nick Charlton
I started brewing beer about three years ago and got to the stage where I was doing full-grain brewing and was really into it. But then I moved house and …just stopped. Over those past few years I’ve been living in two (broadly identical) draughty old Victorian houses with nowhere appropriate to leave a fermenter in. With these kind of houses, the temperature fluctuates massively throughout the day and so the first brew was a bit of a disaster. It fermented fine but just didn’t taste ve...| Nick Charlton
I’ve started a new habit this year of tidying up my desk before I leave at the end of a Friday, now when I return on a Monday morning it’s nice and tidy and ready to go, it’s very nice! I finished How To Do Nothing last week. It’s an excellent read and I’d definitely recommend it, but it is one of those books you might just have to read at least twice, Then moved onto Louis Theroux’s Gotta Get Theroux This, plus the 99% Invisible City, both of which have been good, I bottled the f...| Nick Charlton
I spent a couple of weekends back playing around with a Flir ONE, a thermal camera which attaches to a phone. I’d been working on a project which involved some gnarly drilling and was concerned I’d hit a pipe — it turned out as a good excuse to give one a go. The Flir ONE device itselfIt’s a really neat device which worked well for my needs but is let down by some fairly average software. The model I used was a few years old (the newer ones have a much higher resolution) but this wasn...| Nick Charlton
First Week Notes of 2021! It was a busy old time at the end of the year, where I both did nothing quite worth writing up about and a lot of things I couldn’t, The big news is that now I’m fully remote and won’t be going back to the office when the pandemic restrictions lift (maybe for some Friday’s if others do too, but not at all like I once did); this is both exciting and scary as it opens up many options which previously weren’t possible, On the book front, I just finished Englis...| Nick Charlton
It’s been the end of the first part of Review Season this week, a time where I spend an unreasonable amount of time staring blankly at a text editor trying to come up with anything to say. It’s that perfect combination of dreadfully difficult but also concerningly meaningful which leads me to deep writers block. vvvvroooommmmmmm the deadline goes, as it flies by …and then suddenly words happen and manic typing begins. Except this time, with one illusive answer to the question of what ca...| Nick Charlton
Back to work last week and it was a good one: started off with helping out with a database migration (DigitalOcean’s managed database solution is pretty nice!) and then a new project starting with the second phase of a project that’s just Rails. It’s good to be back in the land of Rails, a place where I can comfortably test-drive new features in just a few hours and really focus about the product we’re delivering rather than the minutiae of the code, I somehow ended up leaving a year ...| Nick Charlton
A second week of doing my own stuff; much of the same but a relaxing way to spend a week as I get around to some things I’ve wanted to do for months, I started off by spending a day doing some workflow improvements: I switched from Magnet to Rectangle for macOS window management, Started the move to kitty, with a hurdle around first removing base16 which I’d previously been using to handle colours. It worked really well, but now I’ve learned more about ANSI colours I’ve found I can do...| Nick Charlton
Last week was the end of a — long for me — nine-month project. It was not the easiest nor was it working in a particularly exciting to me technology (React and later React Native) but I learned a lot. And spent a lot of time in Zoom calls, Unfortunately, the client has been badly affected by COVID-19 so the project ended up finishing much earlier than we’d hoped for (it’s nice to actually finish the work you start!) and a little abruptly: the last week was wrapping up everything we co...| Nick Charlton
Unfortunately, as I write this, I have another — hopefully not so long lasting — running-related injury as I’ve pulled a muscle or perhaps sprained my right lower leg/ankle. Queue a day of hobbling around the house and cursing having stairs, My recent injuries have been caused by a combination of things I’ve been gradually understanding over the past year: spending the last decade plus generally sitting has caused a hip imbalance (where the muscles at the front are much weaker), which...| Nick Charlton
I’m now three weeks into having a standing desk and I’ve been doing a 50/50 split of sitting and standing ever since. The most interesting thing so far — and also one of the things I was very excited about — has been that I’m no longer so tired after work. I’ve been finding that standing keeps me going much longer (or, maybe, consistently?) which has always been something I’ve struggled with, Another thing has been that I think I’ve split the past feeling of tiredness and hung...| Nick Charlton
I made an example of using Pronto with standardrb that’ll run on GitHub Actions. It worked out to be one of those things which (mostly) just slotted together and worked, which was nice, A warm cycle around London last week, which mostly reminded me how poorly thought through much of the cycle infrastructure is in certain boroughs: coming off a road into a “dual use” pedestrian/cycling area in a busy shopping area is a dreadful bit of street design, Over the past few weeks I’ve been st...| Nick Charlton
I haven’t written these for a few weeks as pretty much every week has become the same thing and then you realise it’s been quite a long time… A few weekends ago, I had my first actual pint in a pub and it was a strange experience and not quite the full experience I’d hoped for. But it’s a start! I’ve been out doing long-cycles again in the much nicer weather and I have new gravel tyres which should be much better on that sort of terrain that I’ve been getting into more so now, I...| Nick Charlton
Week Notes #14 Since my last post, I published Setting Jenkins Credentials with Groovy. I’ve been using some of the extra time I’ve had from lockdown to wrap up some things I started years ago and this is part of the same thread. There’s a few more posts to come related to this before I get onto something a bit more interesting, But now that the weather has gotten much hotter, I’ve been spending more time outside. I grew a bunch of plants last year and I’m doing the same this year. ...| Nick Charlton
I’ve been building up a nice pattern for bootstrapping Jenkins’ secrets through init.groovy.d, storing the secrets themselves inside configuration management. So far, this has been the simplest way to get a working configuration without additional moving parts beyond Jenkins and a configuration management tool. The Jenkins Credentials plugin supports a few different secret types: “secret text” (which can be used as an environment variable), username & password, files from the file sys...| Nick Charlton
I got a fun new toy this week: The new iPad Pro. I went for the bigger screen this time (I’ve had a few over the years and developed a few iPad apps for them) and also got the new keyboard which has a trackpad built in. The trackpad is curious, I still mostly tap the screen and don’t feel I’ve gotten much out of it yet (the cursor changing dynamically is a cool UI effect though). Having a good keyboard will change things more, I’m aiming to write some of the workflow adjustments when ...| Nick Charlton
Just after the last Week Notes post, I published a short one on configuring Jenkins’ email-ext plugin. Jenkins, as much as a challenge it is to work with, still works the best for running arbitrary jobs and I’ve been working on some infrastructure experiments again, Ubuntu 20.04 came out too, and it has a new installer. This lead to some experiments with trying out the new automated installer method and eventually this post once I made it all work. I’m now tracking an issue on Packer, a...| Nick Charlton
Ubuntu 20.04 — which was released few days ago (23rd April) — brings with it a new installer, replacing the previous Debian installer with subiquity. This means that any of the previous approaches for automated/unattended installs no longer work and need to be replaced. No one seemed to have documented doing this successfully yet with Packer, so I set out to figure it out. But first, here’s a working unattended configuration: ubuntu-2004.json: {"builders":[{"name":"ubuntu-2004","type":...| Nick Charlton
A little while ago, thoughtbot added a new team lead role and I started that a week ago when we rolled that out into our London office. It’s exciting to start doing something a bit different formally, Read The Coaching Habit; this was recommended to me by a friend a month or so back and it’s all about giving less advice and asking more questions. I ended up reading it on a sunny bank holiday afternoon in the garden and I’d recommend it, Less successfully, I spent some time on a bit of a...| Nick Charlton
The default email notifications provided by Jenkins are a little inflexible, but the email-ext plugin adds a whole host of configuration options. I use this to provide the build log in some sync jobs I have, but I wanted to configure this via a script in Jenkins’ init.groovy.d directory to automate the configuration. I’ve leaned this article, this Gist about setting up users and this other Gist about configuring credentials as I’ve done this before, but I couldn’t find anything which ...| Nick Charlton
Double digits! I’ve written ten of these now. It’s gradually becoming a habit, especially once I’ve noted at least one thing down during the week, This week I moved everything over to Drafts. Previously I was using Bear (which is a great app), and then sort of using both tools whilst I figured this out, But the interesting bit isn’t the tool, it’s the habit formation: I write nearly everything first in Drafts before moving it elsewhere (be it Basecamp messages, GitHub issue replies ...| Nick Charlton
This was the first full week of working from home for me in years. I used to do this when I freelanced, which whilst a while ago often seems to help in surprising ways, I am seeing meetings which were a mix of colocated and remote run better and gradually finding work becoming more asynchronous, which is all great to see. These are things that’ll make everything better in the long run, once the immediacy is over. But, never before has writing “take care” in an email to a relative strang...| Nick Charlton
This was the week where Coronavirus/COVID-19 mitigations really stepped up, especially for people (like me!) working for predominantly US companies. In the absence of stronger advice and organisations where working remotely is relatively easy, this is a good move, On that, we moved to being fully remote for the foreseeable future. I’ve got a pretty good setup in this regard as I already do this once a week. Ergonomics are important to me; if I just work on my laptop I get tired faster and m...| Nick Charlton
Last week, I released a new version of administrate-field-nested_has_many, These last two weeks have been interesting in that there’s been lots going on …and none of that I can publish. After doing this seven times, I’m pleased about how much I really do operate in the open, Tailwind UI came out this week, I’ve been following along through the Art of Product podcast and spent some time playing around with it this weekend. I’m still on the fence with Tailwind. It’s a utility-first ...| Nick Charlton
With Storm Ciara bringing wind gusts of up to 60mph, I ended up not cycling all week. There’s not much fun (and safe) cycling to be had in those sorts of wind speeds, I spent a good chunk of time this week working on Appraisal, and I’m really happy about that. It’s been falling behind with everything since Bundler 2.0 was released, and my approach of ignoring it wasn’t going to last forever. I closed a bunch of PRs, opened a few more related to Ruby versions and accepting paths (which...| Nick Charlton
Some things are a blessing in disguise: we started the week blocked on our current piece of work, which after the hectic week previously really helped, This was because we were blocked on everything as the feature we’re working on depends on an API, which depends on the release of a service rewrite and the next (and final) bit of work is the same as we’ve already done. We could certainly do more but also achieve less, it’s a tough one but was the right call, Tuesday morning was entertai...| Nick Charlton
I decided to skip last week’s. Nothing of interest happened, outside of the weekend which fits just as well here. Spent last weekend with my Mum, which was lovely. We started off a batch of homemade wine, which was great fun, Started using Drafts on inspiration from Luke. I’d previously been using Bear (which I’ve really liked), but I’ve been curious about Draft’s actions since starting these Week Notes and automating what steps there are (manually breaking out long lines with links...| Nick Charlton
New office, new cycle route for the first half of the week. This always throws out the routine for a little bit, but you get used to it soon enough, With this project I’m trying out a new tactic: pairing by default. I’m starting from a position of not being confident in the technologies we’re using, so that’s helping me. Plus I’m trying to solve a problem I regularly have, which is to fall deeply into a specific problem at the expense of the overall goal. I’m hoping by instead ask...| Nick Charlton
Started on a new project this week. I can’t tell you about it, other than I’ll be writing React. I’ve traditionally struggled to do enough for the knowledge to end up sticking, so I’m hoping this will help, I completed my goals planning for the year. Every year I do this it gets easier, and this year I’m especially pleased with how specific and actionable they’ve ended up, Two days into cycling to work ended up with a puncture on the way home. Turned out to likely be something I m...| Nick Charlton
Several people I follow post #weeknotes, which I’ve always found a particularly interesting insight into what people are doing. I thought I’d give it a go. I plan to do a mix of work (when I can post about it), open source, side projects and fitness & adventure topics, which I hope will keep it interesting. Right. Here we go… I’ve been spending the past week diving deep into Administrate’s issues and open PRs, looking for trends and building a taxonomy of labels, To do this, I ended...| Nick Charlton
I don’t do many things frontend these days, but I’ve wanted to try out Tailwind for a while, and I finally had the opportunity. Alas, it was a Rails app which had no frontend at all (apart from administrate), so I need to start from the very beginning. Here’s how I did it: Webpacker I needed to add Webpacker, as I’d initially not done this when generating the application. You should be able to skip this if you already have a working setup. First, I added webpacker to the Gemfile and t...| Nick Charlton
How can you do token authentication with Rails out of the box? See on Giant Robots| Nick Charlton
I’m starting on a Go project for the first time in a while, and a few people have asked me how to starting writing Go. The last time I spent a significant amount of time writing Go was over a year ago, so while I also needed to refresh my knowledge, there have been a few new things released since. I learn best in two phases: first reading a lot about a subject and then building something with it. The project itself is the last bit, but going into it I want to be as ready as I can to hit the...| Nick Charlton
I’ve been using Terraform for just about four years at this point, but outside working with other organisations’ configuration, I’ve not sat down and built something from scratch since the very beginning. Then, I’d only had a single environment that was configuring DNS for all of my domains or was putting together examples for otherprojects. But most recently, I’ve wanted to pull this configuration together as I’ve been experimenting with Kubernetes on Google Cloud and to have som...| Nick Charlton
I’ve been playing around with Kubernetes a bunch recently, especially with Google Kubernetes Engine (GKE). Google Cloud, and especially, their managed Kubernetes solution works really well. The best tool for configuring this sort of thing is Terraform, but the few examples I came across had lots of extra complexity which I felt distracted from what really needed to be there. This starts with a very basic implementation to bring up a cluster, through to some useful configuration for nodes wh...| Nick Charlton
Whilst I do spend most of my time writing code, I’m also a consultant. Every year I work with a bunch of small companies, founders and those who are running teams in much larger organisations. These are people who do care about the quality of the code I might produce, how well tested it is and that decisions have been made for the long term, but that’s all a bit moot if we’re not building the right thing for their customers. Over the last few years, government and large enterprises have...| Nick Charlton
CircleCI 2.0 brings some great new features, but it’s not so straightforward to get started with. Let’s walk through how to get going. See on Giant Robots| Nick Charlton
2017 was a tough one. This year was the start of the implementation of the bad things which came about in 2016. Brexit, Trump and a further, significant, continuation of the expansion of social, racial and economic inequality. Many of these things go back a very long time and so if you’re surprised by them, you’ve not been paying enough attention. For me, 2017 was exhausting and stressful. But also a time where I got to the stage where I started finding myself and doing the sorts of thing...| Nick Charlton
If starting to co-host Build Phase wasn’t enough, Chad Pytel and I did a WWDC cross-over episode of Giant Robots, the main company podcast. We ran through the news out of the main keynote and parts of the Platforms State of the Union (the developer keynote) and what we thought about in just about an hour. It was good fun and a bit different to talk about something which is all tech news. I hope we’ll do it again! You can find future episodes of Giant Robots at giantrobots.fm, on iTunes or...| Nick Charlton
I now co-host a podcast! A few weeks ago, I agreed to take over co-hosting Build Phase, our podcast about mobile (mostly iOS) development. I’m joining Jack Nutting, who used to work with us in Stockholm. Podcasting is something I’ve wanted to do for a long time, but without someone prompting me, I was going to keep avoiding it. Fortunately, Jack knows what he’s doing and helped make the first episode pretty painless. We’ll be releasing new episodes every other week from here on out. I...| Nick Charlton
I have a collection of macOS machines, some of which are used for services like Jenkins and others which are used for testing. These all have a consistent base configuration which I’ve been using Ansible to configure. Ansible is being used to to drive a set of utilities that have emerged to help with some of the rougher edges of configuring macOS. In places where this abstraction isn’t available, I’m calling out to defaults write to set settings directly. There’s a fewexamples and a s...| Nick Charlton
Over the past couple of weeks, I’ve been building up a box running ESXi 6 to host a bunch of virtual machines. I documented the initial configuration in a previous post, but this goes further and attempts to automate much of this using Packer. My end goal is to have the complete configuration held in a repository to make rebuilding (or adding new boxes) as painless as possible and also to provide an example for others implementing something similar. I’ve put together a (public) repository...| Nick Charlton
ESXi is a funny beast when it comes to SSH keys, and there’s a lot of misinformation about on how to configure them persistently, not to mention security FUD. ESXi uses an in-memory only filesystem for the bootable portion of it, so following the published guide will only get you so far. You’ll find that after rebooting, your changes will no longer be there. You can work around this limitation by rebuilding the keys on boot using /etc/rc.local.d/local.sh. Somewhere before the exit 0, add ...| Nick Charlton
Hetzner are a relatively low-cost hosting provider based out of Germany. They provide a range of powerful but cheap dedicated servers which make a good platform for experimenting with VMWare ESXi or other virtualisation software. However, their networking is based around statically routing MAC addresses which makes it both a bit different to more common VLAN setups and harder to get up and running. They do have a canonical guide to configuring this, but I found my knowledge of networking a la...| Nick Charlton
I regularly work with production data (obfuscated when necessary) with local Rails apps. It’s much better to work with real-world data when building out projects as it allows you to make decisions according to what will really happen. But, importing them can be a bit of a pain. I’d previously been writing out the command for pg_import manually. So, I wrote a quick Rake task to do this for me: namespace:dbdodesc"Import a given file into the database"task:import,[:path]=>:environmentdo|_t,a...| Nick Charlton
On the site, Docker recommend using the Docker Toolbox to get up and running with it. I’m personally not much of a fan of these “platform” installers; in attempting to provide a common solution for most, people like me end up fighting with it. Fortunately, this can all be done standlone through Homebrew. Here’s how to do it: brew install docker docker-machine This pulls in the docker executable and the new(er) way to managing machines (as you can’t use Docker directly on OS X): dock...| Nick Charlton
Ubuntu uses bazaar as it’s source control system, with Launchpad as the hosting service. This is fine, apart from when you want to include something which is maintained in Git or otherwise doesn’t have good enough support for it. In my case, I wanted to mirror a repository on GitHub so that it could be included elsewhere as a submodule. Bazaar provides dpush for this, but it wasn’t so obvious at first sight how to work with it. (Replace example with the appropriate name): 1. Ensure You...| Nick Charlton
I’m currently in the process of designing out the architecture for a project which is soon to be hosted on AWS. My aim has been to isolate groups of components (like Redis and/or Postgres instances) from other groups (like web application servers) as much as possible to restrict access. AWS provides VPC (Virtual Private Cloud) to do such a thing, but it’s quite fiddly to get going. This is where Terraform steps in. Terraform is a tool that allows you to automate your interactions with ser...| Nick Charlton
Jenkins is a continuous integration (CI) server written in Java. It’s a pretty common solution for self-hosted CI servers. A lot of the documentation for installing on OS X is a little old (OS X has changed a lot when it comes to say, Java, in the last few years) and it seemed a good plan to write up something a bit newer. I host a Jenkins instance on a hosted Mac mini with Macminicolo. In addition to Yosemite, it’s also got the OS X Server package installed, Open Directory (which is Appl...| Nick Charlton
Picture the scene: You’ve got a hosted Mac somewhere on the internet, you connect to it via a VPN to access the services you host on it, but you’d like to use domains to refer to these and have them look up correctly. The solution to this (and to a bunch of similar problems) is to configure a DNS server internally to handle look ups for you. It’ll return internal-relevant IPs for domains (which could in this case be anything). This is basically a much more specific version of Apple’s ...| Nick Charlton
I have a hosted Mac mini with Macminicolo that I use for a range of things, but predominantly as a build server for boxes and other projects (which require something like Xcode). However, there’s two problems which are slightly outside of the GUI which crop up. Here’s a few notes on fixing those… Configure Server Manager to use a Custom SSL Certificate If you’ve configured a custom SSL certificate, Server Manager will apply it to all of the services managed by it (Websites, Mail, etc)...| Nick Charlton
Rack is the (excellent) common denominator web library for Ruby. Sass also happens to be written in Ruby. Combining the two can be the perfect solution to building Living Styleguides, especially if you’re providing them as an Gem. I did this on a recent project, but the documented combination of the two was a bit lacking. Static Sites with Rack Rack is very barebones (it’s usually used behind the scenes in Sinatra or Rails), but it does provide Rack::Static which provides much of what we...| Nick Charlton
I seem to do a lot with Virtual Machines and this was no different. I’d started out trying to reverse engineer an otherwise undocumented section of a client for a hosting service I use and I was keen on configuring an isolated environment for it. mitmproxy is a tool for intercepting HTTP and HTTPS traffic and then allowing you to easily inspect it. In transparent proxy mode, it can sit at the network level and intercept everything without any other configuration. There’s a few steps to it...| Nick Charlton
Sometimes, ActiveRecord queries can get pretty complex, especially if you’re implementing a feature like search over a typical “index” page that also has pagination and the term itself is optional. Fortunately, ActiveRecord queries can be chained in a few ways to make this a little bit nicer. The most common is like: user=User.where(name: 'Nick Charlton').limit(1) Which you’ll see often. But you can also do something like this, which works really well for more complex queries: user=Us...| Nick Charlton
I usually use Postmark for outgoing transactional email, I find this to be better than expecting the underlying system to have a correctly configured sendmail and it helps with deliverability. Sinatra, though, doesn’t have a convention for handling email. The Sinatra FAQ lists an example using Pony, so going from there, here’s an example of using the Postmark Gem with Sinatra: require'sinatra'require'postmark'configuredoset:mailer,Postmark::ApiClient.new('')endget'/send_mail'dosettings.ma...| Nick Charlton
Sinatra is a cool little framework for building web tools in Ruby. I’ve been using it for years to build out little examples, tools like moviesapi, experimenting with REST and Hypermedia API design and now I’m using it to build a relatively complex web service that provides the core of a new project I’m part of. But I’ve never written down how (and why) I structure projects in the way I do. Being such a tiny framework, Sinatra doesn’t impose any pattern on you (both a blessing and a...| Nick Charlton
I’ve just released a new RubyGem which makes caching objects (and allowing them to expire) in Redis easy. It’s called reserve and the source is on GitHub. This came from a desire to easily wrap common but slow tasks in a block that would give me the advantages of caching but not increase the code complexity significantly. We can do this by assuming that the output of most operations could be serialised as JSON and then be thrown into a Redis instance. That means that the simplest implemen...| Nick Charlton
If you’re reading this, it means that I successfully rolled-out the fourth1 version of this site. It’s a small set of changes from before, but there is a new style which accompanies a simpler design. On the design side, I wanted to deemphasize the latest set of posts (they’re not, and never have been time dependent) and instead have it as a short representation of me. Thus the blurb on the homepage. I also wanted to remove the dedicated pages of static content (About, Projects, etc) whi...| Nick Charlton
Pandoc has a huge set of extensions which are not enabled by default and whilst Hakyll does enable quite a few in its own options (like footnotes), I wanted to add support for definition lists. In Hakyll, the best way to do this seems to be to implement a custom content compiler, as this can then be used everywhere you render content. This is exactly what I did. The first thing was to look up the reference to the default compilers and see what was already there. Hakyll provides: pandocCompile...| Nick Charlton
There’s a couple of (client) projects which I maintain which have been in existence for quite a while (one still has full iOS 5 support and hopefully we’ll be able to drop that soon), but they’re still well maintained and have reasonable test suites that have followed them through rather well. Sadly, Xcode can be a bit difficult and this time was no exception — although it did take a long time before the issue was seen. In this project, I had a situation where the original SenTestingK...| Nick Charlton
I’ve been doing a few things with Ruby which involve controlling and responding to long-running processes, where the Ruby-based ‘wrapper’ takes the task of automating something which is otherwise quite complex. Perhaps the best example is boxes, which uses a collection of Rake tasks to generate Vagrant boxes using Packer –– each build takes somewhere in the region of twenty minutes to complete. But, I wanted to be able to more closely control the output (hiding much of it from view)...| Nick Charlton
Introduction For at least the past three years, I’ve been reading Chris Guillebeau’s Annual Review series. He publishes a set of blog posts in December each year running through what he (and his business) did, what he thought of it and what he’d like to do in the upcoming year. I’ve been doing something similar myself for about the same time (I also used to come up with a plan for summers back when I had long expanses of free-time; usually a collection of things I wished to learn), bu...| Nick Charlton
Alex Payne looks at the alternatives to his current setup and draws some conclusions. In his article, he’s put words to things I’ve so far been unable to describe to people myself: “the Galaxy S4 is uninspired but good” “does not feel like a premium product. It is plasticky and sort of embarrassing to carry around, though its cheapness does lend it a sense of devil-may-care durability.” And, then: Let’s not even speak of the system fonts, ugly but ignorable on a phone and downri...| Nick Charlton
There is nothing more annoying than seeing, or ending up sharing URLs that look like this (it’s split so it doesn’t look completely terrible…): http://www.nytimes.com/2013/08/25/opinion/sunday/ \ im-thinking-please-be-quiet.html? \ ref=opinion&_r=3&utm_source=buffer&utm_campaign=Buffer &utm_content=buffer8fcfe&utm_medium=twitter& It’s not so much the efforts of marketing people to track how their URLs spread around the web that annoys me, but more that it’s so damn ugly and far too ...| Nick Charlton
I just released moviesapi. In the post I introduced it, I mentioned wanting to be able to add reliable tests. Ben Keeping responsed suggesting that I have a look at VCR. So I did. It’s a Ruby library that records the web requests that your application depends upon and saves it down to disk. On subsequent test runs, it reuses (“replays”) the previously saved data, vastly increasing the speed. For screenscraping tools like moviesapi or UrbanScraper, I can verify that my code is behaving c...| Nick Charlton
And so, sadly, that is the end of Young Rewired State for another year. Like last year, I was a mentor down in Plymouth, where we had five participants and (overall) three mentors. Much like last year, this year was also incredible. After going through all of the introductory material, then talking about sources of open data and technology options, we stepped back to give them some time to brainstorm. By the end of the first day, they all had an idea of a project that they wanted to work on t...| Nick Charlton
The other day, I tweeted a link to a regex-based mute filter for Tweetbot. The full URL looks like: tweetbot:///mute/keyword?regex=1&text=(%3Fi)%23%3Fbreaking(%3F%3D%20%3Fbad) It uses Tweetbot’s URL scheme1, to provide a predefined mute filter. This way, a filter can be shared without copy and pasting it, which is quite nice. In trying to work out how to do this, I ended up browsing around Twitter trying to find an example of how to pass along a regex in the URL, as I had seen it done befor...| Nick Charlton
I have a particular preference for the size of my browser window, and I like them all to be consistent. I divide my time between a 13” MacBook Pro and the same device attached to a 27” Thunderbolt Display. Usually this works out great, but over time, my browser windows will all end up being slightly different. Some will be a bit shorter, some wider, some off centre.| nickcharlton.net