<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom"><title>Nas Khan</title><link href="//nakhan.net/" rel="alternate"/><link href="//nakhan.net/feeds/all.atom.xml" rel="self"/><id>//nakhan.net/</id><updated>2026-04-17T00:00:00+01:00</updated><entry><title>How LLMs changed the way I work</title><link href="//nakhan.net/how-llms-changed-the-way-i-work.html" rel="alternate"/><published>2026-04-17T00:00:00+01:00</published><updated>2026-04-17T00:00:00+01:00</updated><author><name>Nasef Khan</name></author><id>tag:nakhan.net,2026-04-17:/how-llms-changed-the-way-i-work.html</id><summary type="html">&lt;p&gt;I first started mucking about with ChatGPT on the web back in the GPT-3.5 days, so late 2022. To be
honest, it was quite substandard for coding. It got things wrong constantly, had a habit of
sounding more confident than it had any right to and generally felt like …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I first started mucking about with ChatGPT on the web back in the GPT-3.5 days, so late 2022. To be
honest, it was quite substandard for coding. It got things wrong constantly, had a habit of
sounding more confident than it had any right to and generally felt like an interesting novelty
rather than something I could rely on. Even so, I came away from it with the feeling that the
underlying technology clearly had legs.&lt;/p&gt;
&lt;p&gt;GPT-4 was the point where I really started paying attention. That was the first release that made
me think this was not just a toy with good marketing. The jump in quality was obvious. The problem
was that the tooling around it still had not really caught up. Most of it was still driven through
the ChatGPT web UI, with editor integrations only just starting to appear.&lt;/p&gt;
&lt;p&gt;I tried a few of those early coding tools. I eventually settled on
&lt;a href="https://github.com/CoderCookE/vim-llm-agent"&gt;&lt;code&gt;vim-chatgpt&lt;/code&gt;&lt;/a&gt;, now renamed &lt;code&gt;vim-llm-agent&lt;/code&gt;, along
with the official &lt;code&gt;copilot.vim&lt;/code&gt; plugin. They were useful enough, but still felt a bit cramped.
&lt;code&gt;vim-chatgpt&lt;/code&gt; was basically file or selection based, while Copilot felt like autocomplete on
steroids. Better than nothing, certainly, but still clunky and rather narrow.&lt;/p&gt;
&lt;p&gt;There was also a middle phase in all this for me, and that was &lt;a href="https://aider.chat/"&gt;aider&lt;/a&gt;. I
used it quite a lot before fully adopting Claude Code. It was much more manual than the newer
agentic tools, but that was part of the appeal. It was open source, gave me more control and fit
better with the sort of environment I like working in. Even so, once the newer wave of tools
arrived, especially Claude Code, it was hard to ignore the gap in sheer capability. Crazy how fast
things move in this space.&lt;/p&gt;
&lt;p&gt;I was never especially taken with the GUI-heavy side of this world, so I skipped the Cursor hype
entirely. I have to say, I am glad I did. I much prefer a CLI-based development environment where I
can actually see what is going on, compose things myself and not feel like I am being gently pushed
into somebody else's idea of how development ought to work. I did use VS Code and GitHub Copilot on
some projects, more or less because I had to, and they were fine. Useful, yes. But they never felt
natural to me.&lt;/p&gt;
&lt;p&gt;The point where this all really clicked for me was summer 2025, when I trialled Claude Code on a
devops-heavy internal workstream for a project deployed on AWS via Terraform. That was the first
time I felt I was dealing with something that could take in not just the current file, or even just
the repository, but the wider infrastructure and operational context as well. Suddenly AI-driven
devops felt practical rather than gimmicky. Working that way was amazing. It genuinely felt like my
abilities had been multiplied.&lt;/p&gt;
&lt;p&gt;A concrete example was a fairly involved Terraform and Kubernetes deployment. I am not a Kubernetes
expert, but I know enough to make my way around. Claude Code made it much easier to fill gaps in my
knowledge quickly, understand how the moving parts fit together and get productive without weeks of
mucking about first. That, to me, is one of the most interesting things about these tools. They
amplify existing expertise rather than replacing the need for it. You still need enough background
knowledge to spot when they are talking nonsense, glossing over something important or making
dangerous suggestions, especially around security.&lt;/p&gt;
&lt;p&gt;Since then I have tried a fair few tools, including OpenCode, Codex, VS Code Copilot, Claude
Code and, more recently, pi.dev. I also tried Codex fairly early on, but at the time it felt like
it still had a fair bit of growing up to do, so I did not stick with it. I should probably give it
another look. I was actually quite bullish on OpenCode for a few months. It seemed promising and I
liked where it was heading. But over time I became less comfortable with some of the security
trade-offs, especially after a &lt;a href="https://news.ycombinator.com/item?id=46539718"&gt;remote code execution issue&lt;/a&gt;,
and parts of the privacy story felt murkier than I was comfortable with. It also started to feel
too batteries included for my liking, in much the same way Claude Code can.&lt;/p&gt;
&lt;p&gt;That was a big part of why I ended up adopting pi.dev instead. It is much simpler and much more
transparent. What I really like is that I can inspect its behaviour while using it, and change that
behaviour in real time. That is a very powerful property in a tool. I am not an Emacs user, but I
can understand why people who are into Emacs become so attached to it, because this scratches a
similar itch. When a tool is simple enough to understand and pliable enough to reshape to your own
needs, it starts to feel less like a product and more like part of your environment.&lt;/p&gt;
&lt;p&gt;I have also added &lt;a href="https://github.com/nakhan98/dotfiles/blob/master/.pi/agent/extensions/modes.ts"&gt;my own permissions layer&lt;/a&gt;
to pi.dev to make it safer to use, which suits the way I like to work. It is not doing anything
especially magical there either, which I mean as a compliment. It is simple enough that I can see
how it behaves and change it when I feel the need.&lt;/p&gt;
&lt;p&gt;I am also checking out Amazon Kiro on the CLI side, and it seems very decent so far. That said, it
still feels like a rather AWS-shaped product, being built on Amazon Bedrock, so it is a different
sort of walled garden. For now, I have more or less settled on Claude Code and pi.dev, with Kiro
looking promising as well. Claude Code feels very batteries included, which is not always a bad
thing. pi.dev is almost the opposite. It is small, clear and easy to reason about. For my own work,
I find myself preferring that.&lt;/p&gt;
&lt;p&gt;The disappointing part is Anthropic's stance on third-party tools piggybacking on Claude consumer
subscriptions and rate limits. OpenCode, for example, was explicitly blocked first. More recently
Anthropic moved to stop &lt;a href="https://news.ycombinator.com/item?id=47633396"&gt;third-party harnesses&lt;/a&gt;
more generally from using Claude subscription limits. That has made the Claude ecosystem feel more
like a walled garden than I would like. That is a pity, because I generally prefer Anthropic's
models. OpenAI, by contrast, seem much more comfortable with third-party integrations and
harnesses around their coding tools, and I think that is the right instinct.&lt;/p&gt;
&lt;p&gt;As for the current state of the art, I have to say I am amazed by it. What these tools can already
do is extraordinary, and I do not think the pace of change is slowing down any time soon. The
effects on software engineering, and probably plenty of other fields, are going to be dramatic.&lt;/p&gt;
&lt;p&gt;At the same time, I am not completely relaxed about what this means for the profession. I can quite
easily see a future in which fewer software engineers are needed, junior roles become much rarer
and more of the industry is driven by a relatively small number of highly leveraged people
directing tools and agents, software captains if you like. If anything, these tools seem to
increase the value of judgment and existing experience, which is part of why I suspect junior roles
may get squeezed first. That may be where this is heading. I am fascinated by it, and I use these
tools constantly, but I do not think software engineering is about to disappear. I do think it may
end up looking very different from the profession many of us entered, and I would be lying if I
said I did not find that future a bit unsettling.&lt;/p&gt;
&lt;!-- TODO later: explore the more cultural / subcultural side of this. Coding now feels less about perseverance, discipline, and internalising arcane language syntax over years of practice. I used to take a quiet pride in knowing the fiddly corners of Python and Bash, learned and remembered over decades. What happens to the old nerd / hacker path, the people who sat in dark bedrooms with the curtains drawn, patiently learning obscure things and building real things that ended up mattering? What happens to the hacker community if a lot of that deep craft knowledge becomes less central? Is that culture going to shrink, change beyond recognition, or die off entirely? --&gt;</content><category term="misc"/><category term="ai"/><category term="llm"/><category term="programming"/></entry><entry><title>From Mac to Linux... Again</title><link href="//nakhan.net/from-mac-to-linux-again.html" rel="alternate"/><published>2026-02-18T00:00:00+00:00</published><updated>2026-02-18T00:00:00+00:00</updated><author><name>Nasef Khan</name></author><id>tag:nakhan.net,2026-02-18:/from-mac-to-linux-again.html</id><summary type="html">&lt;p&gt;I've been a GNU/Linux user in my personal life since around 2006/7, though my first encounter came
a couple of years earlier, I remember burning a Ubuntu 5.04 (Hoary Hedgehog) Live CD and
nervously booting it on the family PC, half convinced I'd destroy something in the …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I've been a GNU/Linux user in my personal life since around 2006/7, though my first encounter came
a couple of years earlier, I remember burning a Ubuntu 5.04 (Hoary Hedgehog) Live CD and
nervously booting it on the family PC, half convinced I'd destroy something in the process.
I didn't, obviously. It's a Live CD. Online back then every other person who seemed to know
what they were talking about was running Linux, and it felt like a new frontier. The first
proper install was Ubuntu 6.10 (Edgy Eft) on my laptop at uni. Prior to all of that I was a
Windows user going all the way back to 3.11 for Workgroups. Making the leap to Linux felt
like a significant lifestyle change, and for most of the following decade-and-a-half it
remained my computing home.&lt;/p&gt;
&lt;p&gt;Work is what pulled me toward Mac. I've been using one at the office for nearly ten years now.
The appeal is obvious: a Unix-like OS that let me stop mucking about with drivers and
configuration and just focus on getting work done. Enterprise software support matters too:
VPN clients, MDM solutions and the first-class apps for the usual corporate toolkit all just
work on Mac in a way that requires considerably more patience on Linux.&lt;/p&gt;
&lt;p&gt;That work experience gradually wore down my resistance. Around the early 2020s, with the arrival
of Apple Silicon, I made the switch in my personal life too. The M-series chips are frankly
astonishing. The performance and battery life are in a different league entirely. For a while,
I had no complaints.&lt;/p&gt;
&lt;p&gt;But things have been slowly souring. The announcement of macOS Tahoe with its Liquid Glass
redesign crystallised something I'd been noticing for a while: Apple has been drifting from its
"it just works" ethos toward form over function. The sentiment is
&lt;a href="https://news.ycombinator.com/item?id=46114599"&gt;widely shared&lt;/a&gt;. Recurring complaints about
deteriorating software quality, bugs that persist across multiple releases and now a visual
overhaul that prioritises aesthetics over usability. &lt;a href="https://www.eliseomartelli.it/blog/2025-03-02-apple-quality"&gt;Others have documented it better than I
can&lt;/a&gt;. The reaction on
&lt;a href="https://news.ycombinator.com/item?id=43243075"&gt;Hacker News&lt;/a&gt; says it all. The hardware is still
extraordinary. The software is letting it down.&lt;/p&gt;
&lt;p&gt;This got me thinking about going back to Linux. I picked up a Geekom mini PC with a Ryzen 5
processor for the purpose. I've always been a bit of an AMD fanboy and the Ryzen platform has
solid Linux support, GPU drivers included. I've been running Debian on my home servers for the
past decade without complaint, but for the desktop I decided to try &lt;a href="https://archlinux.org/"&gt;Arch
Linux&lt;/a&gt; this time. I'd briefly used it years ago on a netbook but never
as a primary machine. The rolling release model appealed to me, always on current software
without adding backports repos or hunting down dodgy PPAs. To be fair, Debian upgrades have
always been painless for me, and I ran Debian Testing for a while to get more recent packages,
but I seemed to be the only person doing it. The Arch community, particularly the forum, is
considerably more vibrant, and I've never been one for Flatpak or similar workarounds. Arch
just gives you the latest versions. The installation, which once
required a multi-hour rite of passage through the wiki, was surprisingly painless with some
help from Claude and the still-excellent &lt;a href="https://wiki.archlinux.org/"&gt;Arch Wiki&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;For the desktop I went with &lt;a href="https://kde.org/plasma-desktop/"&gt;KDE Plasma 6&lt;/a&gt;. I
did consider going back to a lightweight window manager. I've spent time with
Openbox, Fluxbox, spectrwm and i3 over the years, but honestly I no longer
have the appetite for that amount of configuration. Time is money (especially as
I have a young family now) and I want something functional with sane/attractive
defaults from the moment I log in. KDE fits that bill nicely.&lt;/p&gt;
&lt;p&gt;And I have to say, I was impressed, and &lt;a href="https://news.ycombinator.com/item?id=45288690"&gt;apparently I'm not the only
one&lt;/a&gt;. Out of the box it feels solid and looks
decent. The only thing I needed to change was the display scaling (from the default 125% down
to 100%). That was it. Everything else just worked and I didn't feel the urge to "rice" it or
spend hours tweaking appearance settings. The only thing I changed was the wallpaper settings.
KDE can pull fresh wallpapers automatically from sources like Bing Picture of the Day or
Wikipedia, with no third-party tools needed. I was genuinely impressed.&lt;/p&gt;
&lt;p&gt;What I appreciate most is that KDE sticks firmly to the traditional desktop metaphor. Unlike
GNOME, which has become increasingly opinionated and minimalistic to the point of frustration,
KDE gives you a proper taskbar, a sensible application launcher and sane defaults. I was a
GNOME 2 user back in the day and the transition to GNOME 3 is what originally drove me away,
first to Xfce, then to lightweight window managers like Openbox and Fluxbox, and eventually to
tiling setups with i3 and spectrwm. KDE was going through its own rough patch with the 4.0
transition at the time and I wasn't interested in MATE or Trinity. KDE never lost the plot the
way GNOME did, though. It just stumbled for a while.&lt;/p&gt;
&lt;p&gt;My tools of choice have always leaned FOSS and cross-platform, deliberately so, as it turns
out. Zsh, Neovim, tmux, WezTerm, podman, KeePassXC, Transmission, LibreWolf, VLC (and recently
Claude Code and Opencode) and they all work identically on Linux and make living with a foot
in each camp surprisingly painless. There are some Linux-specific wins too: sshfs, for instance,
which has become an increasingly painful exercise on recent macOS releases, just works. And
while I don't have Homebrew on Linux, the AUR covers what I need. The one persistent irritant
is muscle memory. I reliably reach for the wrong modifier key on whichever machine I'm on.
I can't see that improving anytime soon.&lt;/p&gt;
&lt;p&gt;One thing worth mentioning: I couldn't get suspend working reliably. The system would go to
sleep fine but come back unresponsive, both via keyboard and over SSH. I didn't spend much time
investigating it (life's too short) and in the end just turned off suspend in KDE and the
SDDM login manager. On a laptop that would be a dealbreaker, and it's exactly the sort of
hardware integration where Macs genuinely excel. On a desktop mini that doesn't move, it's a
non-issue.&lt;/p&gt;
&lt;p&gt;I'm not suggesting this is the right move for everyone. I still have a MacBook Air for portable
use, and whatever Apple's software problems, they remain in a league of their own on the
hardware side. But if you're dependent on enterprise software, specific professional
applications or the broader Apple ecosystem then a Mac remains the pragmatic choice. For a
desktop though, and for someone who spends most of their time in a terminal, a browser and a
text editor, Linux in 2026 with KDE Plasma 6 is a compelling option. If macOS Tahoe is
the direction things are heading, I don't see myself going back any time soon.&lt;/p&gt;</content><category term="misc"/><category term="linux"/><category term="mac"/><category term="kde"/><category term="arch"/></entry><entry><title>Thoughts on Star Trek: Strange New Worlds and "Nu Trek" in general</title><link href="//nakhan.net/star-trek-snw-and-nu-trek.html" rel="alternate"/><published>2023-04-01T00:00:00+01:00</published><updated>2023-04-01T00:00:00+01:00</updated><author><name>Nasef Khan</name></author><id>tag:nakhan.net,2023-04-01:/star-trek-snw-and-nu-trek.html</id><summary type="html">&lt;p&gt;I haven't surprisingly written about Star Trek before on this blog despite
being an ardent Trekkie since childhood. I complained previously about my
disappointment with the new Star Wars Films but I was never as committed to its
universe compared to Trek. I grew up on TNG and then moved …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I haven't surprisingly written about Star Trek before on this blog despite
being an ardent Trekkie since childhood. I complained previously about my
disappointment with the new Star Wars Films but I was never as committed to its
universe compared to Trek. I grew up on TNG and then moved on DS9 and Voyager
(and also the TNG films). The Utopian ideals that were embedded in these shows
greatly influenced my own political views on how society should be constructed
and behave.&lt;/p&gt;
&lt;p&gt;The 90s were the golden age of Trek for me. The beginning of the decline
started with
&lt;a href="https://en.wikipedia.org/wiki/Star_Trek%3A_Enterprise"&gt;Enterprise&lt;/a&gt;. It didn't
feel like Trek to me (some say the blame lies with the TNG films). The later
rebooted films were fun popcorn fares but felt even less close to the spirit
of Trek.&lt;/p&gt;
&lt;p&gt;I had huge hopes for Discovery when it was announced in the early 2010s but was
gravely disappointed with what came out. It was just a mess. I appreciated the
talented and diverse caste but the story and the world development was a
fiasco. Season 2 in particular was atrocious. The quite, polite and
introspective nature of 90s Trek was absent. You could excuse that in the
flashy blockbuster films but not here. The whole invention of an &lt;a href="https://sto.fandom.com/wiki/Mycelial_network"&gt;intergalactic
fungal highway&lt;/a&gt; to facilitate FTL
was so stupid it was &lt;a href="https://www.youtube.com/watch?v=E8dPQcXXw4M"&gt;funny&lt;/a&gt;. I
kept watching because that was the only Trek available at the time.&lt;/p&gt;
&lt;p&gt;When I heard about Picard I was ecstatic. The character of Picard was an
inspiration to me and I didn't foresee they would proceed to ruin this too. I
envisaged Picard living a quite, retired  life in his rural chateau, helping
inspire youth in his community to also reach for the stars, provide expert
guidance on local issues/disputes and maybe solve small local mysteries/crime
here and there. The early trailers certainly hinted at this. Like Discovery,
what came next was just bad. Season 2 started out strong but quickly devolved
into hilarity. The plot arcs were nonsensical and ill-thought. Seeing iconic
characters and lore get trashed like this has been very disappointing.&lt;/p&gt;
&lt;p&gt;Some comments on the recent cartoons... Lower Decks has been so-so, it's main
problem is that it tries far too hard to be funny rather than sci-fi. Prodigy
was better and has more potential but still doesn't fully feel like Trek and
its clear it is aimed at a much younger audience. What has been missing on all
these Nu-Trek iterations has been the absence of the optimistic and utopian
ideals of Classic and TNG-era Trek. It's mostly dark, gritty, violent and
nihilistic but not in any sort of smart way. Paradoxically there also a lot of
cheap, contrived sentimentality and emotional instability among the crew which
was jarring compared to the professional demeanor and standards of earlier Trek
crews. Great comparison on this from the &lt;a href="https://youtu.be/UsaTdqhd6eg?t=1492"&gt;Red Letter Media
folks&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;So I didn't have much hope for Strange New Worlds when it was announced. I was
expecting more of the same in line with Discovery and Picard. But I have been
greatly and pleasantly surprised. This is a show that feels like 90s Trek. The
first episode was maybe a bit too preachy but it fully endorsed the classic
utopian vision of humanity and intergalactic cooperation envisioned in Classic
and TNG-era Trek. The story didn't revolve around a single protagonist but the
entire crew working together to solve a crisis. The classic ethical dilemma of
whether to break the "Prime Directive" was satisfactorily explored in both
episode 1 and 2. The rest of the season generally didn't disappoint and
continued in the same vein interspersed with some nice action oriented
episodes.&lt;/p&gt;
&lt;p&gt;Minor criticism (&lt;strong&gt;and spoilers&lt;/strong&gt;) include needless nostalgia bait (e.g. why
make La'an part of the Noonien-Singh tribe?) and the Gorn threat seemed to be
clumsily
&lt;a href="https://screenrant.com/strange-new-worlds-gorn-enterprise-kirk-tos-retcon/"&gt;retconned&lt;/a&gt;
in. But I think I can overlook this. Trek feels like it is back.&lt;/p&gt;
&lt;p&gt;PS - I have neglected this blog for a while due to work and family life but aim
to get back into regularly writing again.&lt;/p&gt;
&lt;p&gt;PPS - I am currently going through Picard Season 3 which is a definite
improvement over earlier 2 seasons but I still have the same basic gripes.
Maybe I will write on this later.&lt;/p&gt;</content><category term="misc"/></entry><entry><title>Running commands in multiple panes in tmux</title><link href="//nakhan.net/running-commands-in-multiple-panes-in-tmux.html" rel="alternate"/><published>2018-06-29T00:00:00+01:00</published><updated>2018-06-29T00:00:00+01:00</updated><author><name>Nasef Khan</name></author><id>tag:nakhan.net,2018-06-29:/running-commands-in-multiple-panes-in-tmux.html</id><content type="html">&lt;p&gt;I recently discovered this neat feature in tmux which has changed my life.  To
repeat the same command in multiple panes in a tmux window, hit your tmux
prefix and enter:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;:setw synchronize-panes&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Run the same command again to toggle off.&lt;/p&gt;
&lt;p&gt;Thanks to &lt;a href="https://jahansyed.co.uk/2018/06/29/how-to-type-commands-in-multiple-terminals-tmux/"&gt;Jahan Syed&lt;/a&gt; for this tip.&lt;/p&gt;</content><category term="misc"/></entry><entry><title>Decommissioning my Raspberry Pi</title><link href="//nakhan.net/decommissioning-my-raspberry-pi.html" rel="alternate"/><published>2018-06-28T00:00:00+01:00</published><updated>2018-06-28T00:00:00+01:00</updated><author><name>Nasef Khan</name></author><id>tag:nakhan.net,2018-06-28:/decommissioning-my-raspberry-pi.html</id><summary type="html">&lt;p&gt;A few weeks ago I decided to retire my beloved raspberry Pi (model 1 B) which I
have been using as a dedicated home media center and a
file/DNS/web/proxy/vpn/torrent/tor server for the past 3 years. I had purchased
an Amazon firestick which took over …&lt;/p&gt;</summary><content type="html">&lt;p&gt;A few weeks ago I decided to retire my beloved raspberry Pi (model 1 B) which I
have been using as a dedicated home media center and a
file/DNS/web/proxy/vpn/torrent/tor server for the past 3 years. I had purchased
an Amazon firestick which took over media player duties (I highly recommend it)
and this got me thinking whether I could upgrade from the model 1B. &lt;/p&gt;
&lt;p&gt;The Pi always got the job done but it was definitely on the slow-ish side. I
wanted to know if I could do better. I looked into the latest model which is a
much more beefy little machine with 1GB of RAM and a 1.2 GHz CPU. But then I
remembered that I had a Dell Mini 10 netbook languishing in the corner of my
room. The last time I had used it was a good 2-3 years ago while experimenting
with Arch Linux. &lt;/p&gt;
&lt;p&gt;So I decided to use that instead. It is equipped with a 1.6GHz Intel Atom
processor and 1GB of RAM so would definitely be an upgrade. Power consumption
would be low due to the ultra low power nature of the CPU making this an ideal
home server. I wiped the disk, installed Debian Stretch on it and copied over
my settings and files. Within an hour or two I was up and running&lt;/p&gt;
&lt;p&gt;Understandably it is running a lot faster than the Pi and will probably serve
me a good few years barring any hardware failures. &lt;/p&gt;
&lt;p&gt;I'm not sure what use I can put my little Pi to now though. I bought it just to
tinker but it ended up inadvertently becoming a reliable home server. The fact
that it was able to reliably carry out all those duties for so long is a
testament to its hardiness and also the power of a good stripped down Linux
distro.  &lt;/p&gt;</content><category term="misc"/></entry><entry><title>Film review - Star Wars: Episode VIII - The Last Jedi</title><link href="//nakhan.net/film-review-star-wars-the-last-jedi.html" rel="alternate"/><published>2017-12-20T00:00:00+00:00</published><updated>2017-12-20T00:00:00+00:00</updated><author><name>Nasef Khan</name></author><id>tag:nakhan.net,2017-12-20:/film-review-star-wars-the-last-jedi.html</id><summary type="html">&lt;p&gt;I had the "pleasure" of watching the latest installment of the Star Wars Saga -
The Last Jedi - over the weekend. After reading through some of the glowing
reviews online by professional critics, I was really looking forward to it.
Taking the reviews at face value I was anticipating a real …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I had the "pleasure" of watching the latest installment of the Star Wars Saga -
The Last Jedi - over the weekend. After reading through some of the glowing
reviews online by professional critics, I was really looking forward to it.
Taking the reviews at face value I was anticipating a real tour de force of
action, adventure, twists, surprises, revelations, emotion, and of course, epic
space battles. I only experienced the epic space battles and that was about it. &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;(Warning: Spoiler below!)&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;I was bored throughout the film and left the the theatre in a confused daze. It
was a poor film by both Star Wars and general standards. Being a bit of a lore
buff, I was particularly looking forward to getting to know much more about
what happened in the aftermath of the Rebel Victory as was seen in The Return
of Jedi, the origins of the First Order and how they came to amass their
immense power, the background and motivations of Snoke, how Kylo Ren was
turned, Rey's parentage etc.&lt;/p&gt;
&lt;p&gt;I didn't get any of that. The Director's intent throughout seemed to be more of
a gratuitous "out with the old, in with the new", mirroring Kylo Ren's weird
obsession with destroying the old order and creating a new one. Continuity and
plot development doesn't matter. I found this disappointing, irritating and
even a bit offensive.&lt;/p&gt;
&lt;p&gt;It would be one thing to break with the Canon of the original trilogy and the
"prequels" - I can somewhat understand that. But there was no attempt to
sincerely carry forward the story and answer some of the questions raised in
the previous film, The Force Awakens. Instead all we got were a lot of nice
special effects, space battles and some nice fight scenes. As if that would be
enough to distract us from questions we wanted answered from the previous film
and the glaring plot holes, absurdities and inexplicable behaviour of the
characters that pervades this one.&lt;/p&gt;
&lt;p&gt;Luke's behaviour, for example, was completely bizarre and completely in
contrast to the brazen determination and unrelenting optimism he exhibited
throughout the original trilogy. The "reasons" given for this radical change in
character (namely, his supposed failure in keeping his nephew on the straight
and narrow) doesn't really make much sense. This is a guy who refused to give
up on his father despite the latter's genocidal crimes.&lt;/p&gt;
&lt;p&gt;In terms of the general structure and editing, the film was a long mess. Large
sections of the film seemed to comprise of a bunch of cut scenes carelessly put
together without much thought for flow and coherence. This was not helped by
the multiple nonsensical threads of the film arising from the inexplicable
behaviour of some of the main characters. For example the Casino Planet segment
was boring, cheesy and totally unnecessary given that the whole charade could
have been avoided if Holdo had simply told Dameron that her plan was to
evacuate to the salt flat planet all along. The film was also too long given
how boredom inducing it was and I was honestly waiting to leave the theatre.&lt;/p&gt;
&lt;p&gt;Were there some positive or redeeming areas? Sure, like any film, but not
enough to salvage the film as a whole. The fight scenes, special effects and
space battles were impressive as can be expected from such a huge franchise.
The cast was also diverse and talented, and there was some brilliant acting,
particularly from Hamill, who deserves an Oscar for making the most of the poor
writing. We also got to see Yoda again so that's definitely a positive.&lt;/p&gt;
&lt;p&gt;I don't have much hopes for the Star Wars IX really. This film will inevitably
be a huge box office success and that's what really matters to the people at
Disney. They have no reason not to produce more of the same. And that's a real
shame. &lt;/p&gt;
&lt;p&gt;If I had to give this film a score, I'd give it a 5/10.&lt;/p&gt;</content><category term="misc"/></entry><entry><title>Warning: Docker does not play well with UFW</title><link href="//nakhan.net/warning-docker-ufw.html" rel="alternate"/><published>2017-12-09T00:00:00+00:00</published><updated>2017-12-09T00:00:00+00:00</updated><author><name>Nasef Khan</name></author><id>tag:nakhan.net,2017-12-09:/warning-docker-ufw.html</id><summary type="html">&lt;p&gt;So I was experimenting with docker a few weeks ago on my VPS (running Debian
9). In particular I was trying to create a memory limited container for running
go-ipfs that would function well in the low memory environment (the VPS only
has 1GB RAM). As mentioned previously, go-ipfs is …&lt;/p&gt;</summary><content type="html">&lt;p&gt;So I was experimenting with docker a few weeks ago on my VPS (running Debian
9). In particular I was trying to create a memory limited container for running
go-ipfs that would function well in the low memory environment (the VPS only
has 1GB RAM). As mentioned previously, go-ipfs is quite RAM greedy. Enough to
swallow all available memory and send my server into a slow swapping hell for a
good few hours until the kernel OOM killer sprang into action.&lt;/p&gt;
&lt;p&gt;I ran something like the following to create/start the container:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;:::sh
$ docker run -p4001:4001 -p5001:5001 -p8080:8080 -m 256M --name ipfs-node \
    --restart always my_ipfs_image
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;which opens and forwards ports 4001, 5001 and 8080 from the host into the container.
Technically, only port 4001 (tcp) is supposed to be exposed to the outside world
according to the IPFS docs (5001 is the API port and is most definitely not
supposed to be accessible from the internets and 8080 is the IPFS gateway).&lt;/p&gt;
&lt;p&gt;I wasn't the least bit concerned about running the above command since I had UFW
set to deny all incoming connections by default (with exceptions for SSH and
some other services I ran). For those not familiar with UFW, it's a simple
front-end for iptables (a utility to configure the Linux firewall). It has
served me well for almost 10 years.&lt;/p&gt;
&lt;p&gt;Little did I know that docker is designed to sidestep tools like UFW and
directly make changes to iptables to perform port forwarding and NAT. And worse
still UFW was completely oblivious to these changes. By sheer luck I ran an nmap
scan on my VPS from home and realized what was happening. Googling "UFW docker"
showed that this was a known issue.&lt;/p&gt;
&lt;p&gt;I initially just gave up on the container route to handle the go-ipfs memory
problems and created a script to restart its daemon every 12 hours. But I came
across a simple solution to the problem yesterday via this &lt;a href="https://www.mkubaczyk.com/2017/09/05/force-docker-not-bypass-ufw-rules-ubuntu-16-04/"&gt;excellent blog
post&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In short, to get docker to work with UFW, the steps are (as root):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;:::&lt;span class="n"&gt;sh&lt;/span&gt;
$ &lt;span class="n"&gt;echo&lt;/span&gt; &lt;span class="s"&gt;&amp;quot;{&lt;/span&gt;
&lt;span class="s"&gt;\&amp;quot;iptables\&amp;quot;: false&lt;/span&gt;
&lt;span class="s"&gt;}&amp;quot;&lt;/span&gt; &amp;gt; /&lt;span class="n"&gt;etc&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;docker&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;daemon&lt;/span&gt;.&lt;span class="n"&gt;json&lt;/span&gt;
$ &lt;span class="n"&gt;sed&lt;/span&gt; -&lt;span class="n"&gt;i&lt;/span&gt; -&lt;span class="n"&gt;e&lt;/span&gt; &lt;span class="s"&gt;&amp;#39;s/DEFAULT_FORWARD_POLICY=&amp;quot;DROP&amp;quot;/DEFAULT_FORWARD_POLICY=&amp;quot;ACCEPT&amp;quot;/g&amp;#39;&lt;/span&gt; /&lt;span class="n"&gt;etc&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="k"&gt;default&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="n"&gt;ufw&lt;/span&gt;
$ &lt;span class="n"&gt;systemctl&lt;/span&gt; &lt;span class="n"&gt;reboot&lt;/span&gt; &lt;span class="c1"&gt;# reboot your machine &lt;/span&gt;
$ &lt;span class="n"&gt;iptables&lt;/span&gt; -&lt;span class="n"&gt;t&lt;/span&gt; &lt;span class="n"&gt;nat&lt;/span&gt; -&lt;span class="n"&gt;A&lt;/span&gt; &lt;span class="n"&gt;POSTROUTING&lt;/span&gt; ! -&lt;span class="n"&gt;o&lt;/span&gt; &lt;span class="n"&gt;docker0&lt;/span&gt; -&lt;span class="o"&gt;s&lt;/span&gt; &lt;span class="mf"&gt;172.17.0.0&lt;/span&gt;&lt;span class="o"&gt;/&lt;/span&gt;&lt;span class="mi"&gt;16&lt;/span&gt; -&lt;span class="n"&gt;j&lt;/span&gt; &lt;span class="n"&gt;MASQUERADE&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;And now you can use docker with UFW in peace!&lt;/p&gt;</content><category term="misc"/></entry><entry><title>Publishing this site on IPFS</title><link href="//nakhan.net/publishing-site-on-ipfs.html" rel="alternate"/><published>2017-10-08T00:00:00+01:00</published><updated>2017-10-08T00:00:00+01:00</updated><author><name>Nasef Khan</name></author><id>tag:nakhan.net,2017-10-08:/publishing-site-on-ipfs.html</id><summary type="html">&lt;p&gt;There has been a lot of buzz online recently about IPFS. In particular, I read
&lt;a href="https://news.ycombinator.com/item?id=15367531"&gt;this&lt;/a&gt; fascinating piece on
Hacker News about how cyber-activists had leveraged IPFS to get around Spain's
federal legal block on all Independence referendum activities. &lt;/p&gt;
&lt;p&gt;I've always been interested by p2p networks so this immediately grabbed …&lt;/p&gt;</summary><content type="html">&lt;p&gt;There has been a lot of buzz online recently about IPFS. In particular, I read
&lt;a href="https://news.ycombinator.com/item?id=15367531"&gt;this&lt;/a&gt; fascinating piece on
Hacker News about how cyber-activists had leveraged IPFS to get around Spain's
federal legal block on all Independence referendum activities. &lt;/p&gt;
&lt;p&gt;I've always been interested by p2p networks so this immediately grabbed me.  I
downloaded and started playing around with it. I am very impressed. This
technology could radically change the web as we know it, making it much more
decentralised, resilient and fault tolerant.&lt;/p&gt;
&lt;p&gt;I decided to go ahead and publish my site on IPFS and it has been a relatively
painless process. Most of the changes I had to make to the site were down to
how I had handled relative links previously. The docs on the official website
are excellent and there are plenty of other resources and tutorials on the net
for anybody interested in getting started.&lt;/p&gt;
&lt;p&gt;The only caution I would issue is that this technology is still in its infancy
so I wouldn't rely on it for anything critical yet. There are definitely some
rough edges that need to be resolved. For example. I've discovered that DNS
resolution can often be painfully slow and this is something the developers
are &lt;a href="https://github.com/ipfs/go-ipfs/issues/3860"&gt;aware&lt;/a&gt; of. Go-ipfs, the main
implementation of IPFS (written in Go) also has high memory requirements and
appears to suffer from memory leaks. I've had to write a script to restart
the daemon regularly on a server with 2GB RAM because of this. This is
something which will have to be addressed if IPFS is to have any success on
embedded or IOT devices. &lt;/p&gt;
&lt;p&gt;My site can be found on IPFS at 
&lt;a href="https://cloudflare-ipfs.com/ipns/nakhan.net/"&gt;/ipns/nakhan.net&lt;/a&gt;.&lt;/p&gt;</content><category term="misc"/></entry><entry><title>Book review - Accelerando by Charles Stross</title><link href="//nakhan.net/book-review-accelerando-stross.html" rel="alternate"/><published>2017-03-29T00:00:00+01:00</published><updated>2017-03-29T00:00:00+01:00</updated><author><name>Nasef Khan</name></author><id>tag:nakhan.net,2017-03-29:/book-review-accelerando-stross.html</id><summary type="html">&lt;p&gt;I have decided to try writing short reviews here for books I am currently
reading. I'll do my best to not include any spoilers.&lt;/p&gt;
&lt;p&gt;So, the book I have just finished is &lt;a href="https://en.wikipedia.org/wiki/Accelerando"&gt;Accelerando by Charles
Stross&lt;/a&gt;. This is another of those
titles that has long remained untouched on my reading …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I have decided to try writing short reviews here for books I am currently
reading. I'll do my best to not include any spoilers.&lt;/p&gt;
&lt;p&gt;So, the book I have just finished is &lt;a href="https://en.wikipedia.org/wiki/Accelerando"&gt;Accelerando by Charles
Stross&lt;/a&gt;. This is another of those
titles that has long remained untouched on my reading list and I am glad to
have finally scratched it off.&lt;/p&gt;
&lt;p&gt;It is initially set in the first years of the 21st century in the immediate
run-up to the &lt;a href="https://en.wikipedia.org/wiki/Technological_singularity"&gt;technological
singularity&lt;/a&gt; and
proceeds to follow over time the mavericks of the uber intelligent,
technologically adept and influential Macx family as they steer humanity's
trajectory through this tumultouos and disruptive period.&lt;/p&gt;
&lt;p&gt;Themes and topics explored in the book include "mind uploading", sentient
animal/human AIs and their rights, distributed intelligences, the
industrialisation of the solar system and beyond, viable centrally AI-planned
economies, increasing cybernetic convergence, alien signals and
ultra-intelligences and our attempts at contact, the
psychological/social/economic/religious costs of exponential technological
progress and much more.&lt;/p&gt;
&lt;p&gt;Stross' prose is sometimes dense but always fashionable, full of
information-packed metaphors of science/tech jargon. This from what I gather is
one of Stross' signature strengths as a writer. Character development was well
done given in my opinion given the surrounding chaos. Stross expertly conveyed
the sense of being there on the cusp of the singularity and his exploration of
the post-singularity world was well handled and enjoyable.&lt;/p&gt;
&lt;p&gt;This is one of the best fictional explorations of the concept of the
singularity and, while it can feel like a bit of a slog in certain parts,
overall it is an intellectually rewarding, thought provoking and enjoyable
read.&lt;/p&gt;</content><category term="misc"/></entry><entry><title>Learning Javascript in 2016</title><link href="//nakhan.net/learning_javascript_in_2016.html" rel="alternate"/><published>2016-10-18T00:00:00+01:00</published><updated>2016-10-18T00:00:00+01:00</updated><author><name>Nasef Khan</name></author><id>tag:nakhan.net,2016-10-18:/learning_javascript_in_2016.html</id><content type="html">&lt;p&gt;I just came across this hilarious/outrageous &lt;a href="https://hackernoon.com/how-it-feels-to-learn-javascript-in-2016-d3a717dd577f#.l8ak5j3gz"&gt;piece&lt;/a&gt; on modern front end development! Dear Lord, what have these guys done!?! &lt;/p&gt;</content><category term="misc"/></entry><entry><title>Upgrading to Raspbian Jessie</title><link href="//nakhan.net/upgrading-raspberry-pi-raspbian-jessie.html" rel="alternate"/><published>2016-09-01T00:00:00+01:00</published><updated>2016-09-01T00:00:00+01:00</updated><author><name>Nasef Khan</name></author><id>tag:nakhan.net,2016-09-01:/upgrading-raspberry-pi-raspbian-jessie.html</id><summary type="html">&lt;p&gt;I got a nasty surprise a few days ago when I found out that Raspbian Wheezy (the OS running on my Raspberry Pi) was effectively &lt;a href="https://www.google.co.uk/search?q=raspberry+pi+wheezy+eol"&gt;EOLed&lt;/a&gt; when Jessie came out in &lt;a href="https://www.raspberrypi.org/blog/raspbian-jessie-is-here/"&gt;September 2015&lt;/a&gt;. I had assumed that, being based on Debian, it would receive security updates until &lt;a href="https://wiki.debian.org/DebianReleases#Production_Releases"&gt;2018&lt;/a&gt;. But due …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I got a nasty surprise a few days ago when I found out that Raspbian Wheezy (the OS running on my Raspberry Pi) was effectively &lt;a href="https://www.google.co.uk/search?q=raspberry+pi+wheezy+eol"&gt;EOLed&lt;/a&gt; when Jessie came out in &lt;a href="https://www.raspberrypi.org/blog/raspbian-jessie-is-here/"&gt;September 2015&lt;/a&gt;. I had assumed that, being based on Debian, it would receive security updates until &lt;a href="https://wiki.debian.org/DebianReleases#Production_Releases"&gt;2018&lt;/a&gt;. But due to shortage of resources and manpower the raspbian team have decided to move straight over to Jessie, which makes sense.&lt;/p&gt;
&lt;p&gt;Unfortunately that means I have been running my Pi without any security updates for almost a year. Since I now use the Pi (hooked up to a large USB hard drive) as my primary home server and also have SSH access to it from the outside world this made me break out in a cold sweat. I only allow public key authentication for SSH but a year is a long time to go without security updates in the internet age for any type of server accessible over the internet. I had to get over to Jessie ASAP.&lt;/p&gt;
&lt;p&gt;I knew that a clean installation was the recommended way to upgrade to Jessie but I did not have physical access to the Pi to do this. I also really didn't want to start from scratch and re-configure everything to the way I wanted. So the only other option was to do the upgrade remotely over SSH, something I haven't done before. After doing some googling, the process appeared to be fairly straightforward so I decided to go ahead with it. In a tmux session I effectively did the following:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="c1"&gt;# Make sure system is already updated&lt;/span&gt;
sudo&lt;span class="w"&gt; &lt;/span&gt;aptitude&lt;span class="w"&gt; &lt;/span&gt;update
sudo&lt;span class="w"&gt; &lt;/span&gt;aptitude&lt;span class="w"&gt; &lt;/span&gt;safe-upgrade

&lt;span class="c1"&gt;# Modify sources&lt;/span&gt;
sudo&lt;span class="w"&gt; &lt;/span&gt;sed&lt;span class="w"&gt; &lt;/span&gt;-i&lt;span class="w"&gt; &lt;/span&gt;/deb/s/wheezy/jessie/g&lt;span class="w"&gt; &lt;/span&gt;/etc/apt/sources.list
sudo&lt;span class="w"&gt; &lt;/span&gt;sed&lt;span class="w"&gt; &lt;/span&gt;-i&lt;span class="w"&gt; &lt;/span&gt;/deb/s/wheezy/jessie/g&lt;span class="w"&gt; &lt;/span&gt;/etc/apt/sources.list.d/raspi.list

&lt;span class="c1"&gt;# Do the upgrade&lt;/span&gt;
sudo&lt;span class="w"&gt; &lt;/span&gt;aptitude&lt;span class="w"&gt; &lt;/span&gt;update
sudo&lt;span class="w"&gt; &lt;/span&gt;aptitude&lt;span class="w"&gt; &lt;/span&gt;full-upgrade
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;br /&gt;
It it important to run the above in a screen or tmux session in case your internet connection breaks during the upgrade process. The upgrade process took a few hours during which time I was asked to upgrade or keep certain configuration files. The process was faily straightforward and I didn't encounter any issues which is a testament to the Debian team since they have made some major changes under the hood (most importanly being the shift to systemd). After doing a reboot following the upgrade everything appeared to be running as normal. &lt;/p&gt;
&lt;h1&gt;Removing GUI&lt;/h1&gt;
&lt;p&gt;I also wanted to remove the GUI on the Pi as I always access it via the command line over SSH. Doing the following got rid of all GUI and Xorg packages:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;sudo&lt;span class="w"&gt; &lt;/span&gt;aptitude&lt;span class="w"&gt; &lt;/span&gt;purge&lt;span class="w"&gt; &lt;/span&gt;~ilibx11
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;&lt;br /&gt;
Booting appears to be much quicker now thanks to systemd:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;pi@raspberrypi:~$&lt;span class="w"&gt; &lt;/span&gt;systemd-analyze&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="nb"&gt;time&lt;/span&gt;
Startup&lt;span class="w"&gt; &lt;/span&gt;finished&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="k"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;11&lt;/span&gt;.819s&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;kernel&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;+&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;36&lt;/span&gt;.814s&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;userspace&lt;span class="o"&gt;)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="m"&gt;48&lt;/span&gt;.634s
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</content><category term="misc"/></entry><entry><title>Migrating to Pelican</title><link href="//nakhan.net/migrating-to-pelican.html" rel="alternate"/><published>2016-07-23T00:00:00+01:00</published><updated>2016-07-23T00:00:00+01:00</updated><author><name>Nasef Khan</name></author><id>tag:nakhan.net,2016-07-23:/migrating-to-pelican.html</id><summary type="html">&lt;p&gt;I've been considering for a while to port this site to a static site generator like &lt;a href="https://jekyllrb.com/"&gt;Jekyll&lt;/a&gt; from the &lt;a href="http://bottlepy.org/docs/dev/index.html"&gt;bottle&lt;/a&gt; based mini blogging/CMS engine I created a few years back to learn web development. I finally decided to make the plunge this weekend, although I decided to go with …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I've been considering for a while to port this site to a static site generator like &lt;a href="https://jekyllrb.com/"&gt;Jekyll&lt;/a&gt; from the &lt;a href="http://bottlepy.org/docs/dev/index.html"&gt;bottle&lt;/a&gt; based mini blogging/CMS engine I created a few years back to learn web development. I finally decided to make the plunge this weekend, although I decided to go with &lt;a href="http://docs.getpelican.com"&gt;Pelican&lt;/a&gt; instead of Jekyll. The migration process has been much quicker and easier than expected. Half of my blog posts have been shifted over and I've re-created most of the other site content and design too. So all the major hurdles are out of the way.&lt;/p&gt;
&lt;h1&gt;Static site generators&lt;/h1&gt;
&lt;p&gt;So why move from a working solution to something new? The main reason was poor python support from my web hosting provider. I had no choice but to use CGI to get things to work (yay 1999)! This always irked me and made me feel dirty. I definitely should have done better research into the "python support" they claimed to provide.&lt;/p&gt;
&lt;p&gt;Static site generators provide an elegant solution to this kind of problem (and have whole host of other benefits too). They effectively allow you to generate HTML pages via templates. No need to worry about databases, security holes or language support. It's just HTML/CSS/Javascript being served up by your web server (many have been using Github pages)! Further, the workflow is completely command line driven and you can write your blog posts in markdown in vim too! Understandably because of this, all the cool geek kids (and even some big companies) are &lt;a href="https://www.smashingmagazine.com/2015/11/modern-static-website-generators-next-big-thing/"&gt;doing it&lt;/a&gt;!&lt;/p&gt;
&lt;h1&gt;Pelican&lt;/h1&gt;
&lt;p&gt;Initially, I was considering Jekyll as that appears to be the most popular static site generator. But being a python guy I thought that there must be a decent python equivelant (Jekyll is ruby based). I set off Googling and discovered that Pelican was the most actively developed and used in the python world. It uses the jinja2 templating engine which I have experience with and generally looked sensible and simple to use. So I opted for that.&lt;/p&gt;
&lt;h1&gt;Migration&lt;/h1&gt;
&lt;p&gt;It took me a few hours of reading to understand the basics of Pelican and I was able to start moving things over. Most of the hard work was actually adapting one of the pelican themes (&lt;a href="https://github.com/getpelican/pelican-themes/tree/master/notmyidea-cms"&gt;notmyidea-cms&lt;/a&gt;) to resemble my &lt;a href="https://web.archive.org/web/20160407054107/http://nakhan.net/blog"&gt;old site design&lt;/a&gt; and making it mobile friendly. Bit of a hacky process but it's mostly done.&lt;/p&gt;
&lt;p&gt;Since I wasn't a very prolific blogger I'm just copy pasting my blog posts over.&lt;/p&gt;
&lt;h1&gt;Conclusion&lt;/h1&gt;
&lt;p&gt;So far I'm quite happy about making the move and I would definitely recommend bloggers who're technically inclined to explore static site generators and Pelican in particular. If you're using something like wordpress I believe there are scripts to make the migration process simpler. The documentation is good and there are plenty of tutorials on the web to help you out too.&lt;/p&gt;
&lt;!--a href="https://www.dropbox.com/s/b1272e1lohepd48/working_the_pelicon.png?raw=1" target="_blank"&gt; &lt;img style="max-width: 100%; min-width: 300px; height: auto;" src="https://www.dropbox.com/s/b1272e1lohepd48/working_the_pelicon.png?raw=1" alt="Working with pelican" title="Working with pelican" /&gt; &lt;/a--&gt;</content><category term="misc"/></entry><entry><title>Toshiba Chromebook 2</title><link href="//nakhan.net/toshiba-chomebook-2.html" rel="alternate"/><published>2015-10-24T00:00:00+01:00</published><updated>2015-10-24T00:00:00+01:00</updated><author><name>Nasef Khan</name></author><id>tag:nakhan.net,2015-10-24:/toshiba-chomebook-2.html</id><summary type="html">&lt;p&gt;I recently decided to purchase a chromebook as I wanted a cheap, portable laptop to browse on and do some casual development on the go. I came across the Toshiba chromebook 2 which had good reviews and was very affordable. I decided to buy the HD version.&lt;/p&gt;
&lt;p&gt;I've had it …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I recently decided to purchase a chromebook as I wanted a cheap, portable laptop to browse on and do some casual development on the go. I came across the Toshiba chromebook 2 which had good reviews and was very affordable. I decided to buy the HD version.&lt;/p&gt;
&lt;p&gt;I've had it for a few weeks now and here are some quick thoughts on it.&lt;/p&gt;
&lt;h2&gt;Hardware and specs&lt;/h2&gt;
&lt;p&gt;The laptop is slim, stylish and relatively lightweight. It is made of silver plastic and does feel a bit on the delicate side but considering the price this is acceptable in my opinion. The battery life is excellent running up to 8-9 hours. The skullcandy tuned sound is surprisingly good and listenable. The 13 inch HD is screen is excellent presenting vivid, sharp video, images and text. Unfortunately the resolution sometimes feel a bit too high as you can find yourself  squinting to read text while browsing but this can be easily solved by increasing the text size.&lt;/p&gt;
&lt;p&gt;As it is a chromebook it as a has cut-down non-standard keyboard which may initially pose issues (i.e no function keys or home/delete/insert etc.). You do get quickly used to this though. I've not fully explored the ports yet but it includes a USB 3.0, USB 2.0 and HDMI port along with a headphone socket and a SD card reader.&lt;/p&gt;
&lt;p&gt;In terms of raw specs, it comes with 4GB RAM, 16GB SSD and an Intel Celeron N2840 CPU. This is more than ample for casual browsing, music, video and CLI based development. One of the features that particularly attracted me to this model is the absence of fans - the cooling is entirely passive. The silence is a welcome change to the constant whines of fans. And you don't have to ever worry about your system overheating due to clogged fan vents.&lt;/p&gt;
&lt;p&gt;The 16 GB disk space is very small but I haven't encountered any issues yet as the aim is to have everything stored on the cloud (Google drive).&lt;/p&gt;
&lt;h2&gt;Chromeos and Crouton&lt;/h2&gt;
&lt;p&gt;Initially, I wanted to wipe the shipped Chromeos and put a GNU/Linux on it but then came across crouton. This is a way to run GNU/Linux alongside chromeos using the power of chroots (Chromeos is a Linux based OS like Android).&lt;/p&gt;
&lt;p&gt;Setting up the crouton is relatively easy but you need to enable developer mode first which gives you access to developer shell. There are plenty of instructions on the net. I recommend starting with the crouton github page. I opted for to run Debian Jessie Xfce as I'm a Debian fanboy. I've not yet fully explored getting i3 running on it but it appears to be possible through some cursory googling.&lt;/p&gt;
&lt;p&gt;What is surprising is that I've found myself spending most of my time within Chromeos. It is very usable and just works. I now usually access the crouton through a bash session ("sudo enter-chroot"). This effectively gives me the best of both worlds, I get to be within a user-friendly OS that just works with full access to a full-featured GNU/Linux environment. Kind of like the Mac but a lot cheaper!&lt;/p&gt;
&lt;p&gt;There is also a command line SSH client which I frequently  use to log into servers. I recommend installing the crosh window extension as the developer terminal that comes with chromeos swallows keypresses like ctrl-n as it runs in the browser. The crosh windows eliminates this.&lt;/p&gt;
&lt;h2&gt;Areas to improve&lt;/h2&gt;
&lt;p&gt;Unfortunately the file manager appears rudimentary and you can only access the Downloads folder in your filesystem. You cannot access CIF/Windows shares out of the box or Dropbox without third party extensions (although these are very easy to install). The Openvpn support is also a bit disappointing as the GUI doesn't support ovpn files (you can get around this by using the CLI client and some bash scripting). There also is no rdp client and I have to fire up an X session on my crouton to run the rdesktop application. Hopefully Google will address some of these issues in the future.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://i.imgur.com/1dsYuwl.png" target="_blank"&gt; &lt;img style="max-width: 100%; min-width: 300px; height: auto;" src="https://i.imgur.com/1dsYuwl.png" alt="" /&gt; &lt;/a&gt;&lt;/p&gt;</content><category term="misc"/></entry><entry><title>Google Play Book Store</title><link href="//nakhan.net/google-play-store.html" rel="alternate"/><published>2015-02-26T00:00:00+00:00</published><updated>2015-02-26T00:00:00+00:00</updated><author><name>Nasef Khan</name></author><id>tag:nakhan.net,2015-02-26:/google-play-store.html</id><summary type="html">&lt;p&gt;I finished reading Dune a few weeks ago which, for those  not in the know, is a famous Sci-Fi novel by Frank Herbert published in 1965. It's considered a modern Sci-Fi classic but it's been laying on my reading list for the past 10+ years, until I discovered the Books …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I finished reading Dune a few weeks ago which, for those  not in the know, is a famous Sci-Fi novel by Frank Herbert published in 1965. It's considered a modern Sci-Fi classic but it's been laying on my reading list for the past 10+ years, until I discovered the Books section on Google Store. &lt;/p&gt;
&lt;p&gt;I'm no newcomer to ebooks and have been using FBReader to read free EPUBs downloaded from the net on my PC and Android phones for several years. But the Google Play Book Store completely escaped my notice until recently. When I discovered it, I decided to give it a trial run by purchasing Alex Ferguson's biography which was on sale for £4.30, a quite reasonable price. The purchase process is simple enough, with several payment methods. I chose to pay via my Mobile Network Operator (EE) as it seemed the easiest at the time. I was asked to enter my password and confirm after which the ebook opened automatically. I was impressed. No hoops or complications to jump through at all. Google really has worked on making this as simple as possible and deserves credit. As someone who deals with broken, half-working software systems on a routine basis this was a breath of fresh air.  &lt;/p&gt;
&lt;p&gt;The ebook itself was of professional quality (no annoying OCR errors) and the Google ebook reader was top-notch too, making the reading experience a pleasant and effortless one. &lt;span style="text-decoration: line-through;"&gt;The only feature that I felt was missing was an invert colour option for the late night reading session.&lt;/span&gt;*&lt;/p&gt;
&lt;p&gt;After devouring Fergie's biography (which I'll probably leave for another post) I decided to explore the Google Play Books library. It is decidedly massive containing  pretty much everything on my reading list. I found Dune and decided to make the purchase immediately. To me, the prospect of being able to hop on to any book on my long neglected, creaking reading list is quite exciting.&lt;/p&gt;
&lt;p&gt;I'm sure most of us have those certain books that we never got around to reading. Well, now you can, almost anywhere you want. As long as you have an Android phone, which is most phones these days, with a data connection. You don't need a specialist device like a Kindle or even a tablet. Ebooks have long been heralded as a revolutionary medium for literature but I think it may be Google who become the dominant force here by making them truly available and accessible. And this is from someone who has grown increasingly sceptical of the company over their recent antics.&lt;/p&gt;
&lt;p&gt;As for Dune, it was everything I expected it to be. Epic and engrossing. Can't wait to dive into the rest of the series. I also now know where George Lucas got his “inspiration” for Star Wars!&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;* Actually, I just discovered this feature last night along with other display options. It seems I completely missed it. So I have no complaints with the Play Books Reader.&lt;/p&gt;</content><category term="misc"/></entry><entry><title>i3 Window Manager</title><link href="//nakhan.net/i3-wm.html" rel="alternate"/><published>2015-02-08T00:00:00+00:00</published><updated>2015-02-08T00:00:00+00:00</updated><author><name>Nasef Khan</name></author><id>tag:nakhan.net,2015-02-08:/i3-wm.html</id><summary type="html">&lt;p&gt;I've been giving the i3 window manager a spin for the last few days after noticing a lot of buzz about it on the webs. I have to say I am very impressed. So impressed I've decided to switch to it from specrwm.&lt;/p&gt;
&lt;p&gt;The first thing you notice when you …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I've been giving the i3 window manager a spin for the last few days after noticing a lot of buzz about it on the webs. I have to say I am very impressed. So impressed I've decided to switch to it from specrwm.&lt;/p&gt;
&lt;p&gt;The first thing you notice when you login is that it isn't an ultra-minimalist tiling wm. It comes preconfigured with a status bar which displays some useful system information (no need for Conky) and a system tray at the bottom (no need for trayer). It also has a task bar at at the top (both based on dmenu I believe). It sports some nice, low profile window decorations. It comes with stacked, tabbed and tiling modes which is very handy. It also has a scratchpad facility to keep rarely used windows out of sight (although this wasn't configured by default on Debian Jessie - see below). The config file is simple and easy to understand and the documentation on the site is excellent.&lt;/p&gt;
&lt;p&gt;To get the scratchpad, screenlocking and the volume and backlight keys working I added the following to my config file (~/.i3/config):&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;&lt;code&gt;&lt;span class="gh"&gt;#&lt;/span&gt; Scatchpad - http://build.i3wm.org/docs/userguide.html#_scratchpad
&lt;span class="gh"&gt;#&lt;/span&gt; Make the currently focused window a scratchpad
bindsym $mod+Shift+minus move scratchpad

&lt;span class="gh"&gt;#&lt;/span&gt; Show the first scratchpad window
bindsym $mod+minus scratchpad show

&lt;span class="gh"&gt;#&lt;/span&gt; Volume Keys
bindsym  XF86AudioMute exec amixer sset Master toggle
bindsym  XF86AudioLowerVolume exec amixer set Master 5%-
bindsym  XF86AudioRaiseVolume exec amixer set Master 5%+

&lt;span class="gh"&gt;#&lt;/span&gt; Backlight
bindsym XF86MonBrightnessDown exec exec xbacklight - 10
bindsym XF86MonBrightnessUp exec exec xbacklight + 10

&lt;span class="gh"&gt;#&lt;/span&gt; Lock Screen
bindsym Ctrl+Mod1+l exec xscreensaver-command -lock
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;

&lt;p&gt;I'm still exploring the different options and facilities but I am very impressed on the whole. Time for a screenshot:
&lt;a href="https://dl.dropboxusercontent.com/s/khskimn311ntjra/2015-02-08-215239_1366x768_scrot.png" target="_blank"&gt; &lt;img style="max-width: 100%; min-width: 300px; height: auto;" src="https://dl.dropboxusercontent.com/s/khskimn311ntjra/2015-02-08-215239_1366x768_scrot.png" alt="" /&gt; &lt;/a&gt;&lt;/p&gt;</content><category term="misc"/></entry><entry><title>Basic Power Management Script</title><link href="//nakhan.net/basic-power-management.html" rel="alternate"/><published>2015-01-30T00:00:00+00:00</published><updated>2015-01-30T00:00:00+00:00</updated><author><name>Nasef Khan</name></author><id>tag:nakhan.net,2015-01-30:/basic-power-management.html</id><summary type="html">&lt;p&gt;I mentioned previously that I'm back to using the Spectrwm tiling window manager on the laptop. So there I was the other day doing some work on it when suddenly out of the blue the system died. Turns out I hadn't connected it to the power supply and it was …&lt;/p&gt;</summary><content type="html">&lt;p&gt;I mentioned previously that I'm back to using the Spectrwm tiling window manager on the laptop. So there I was the other day doing some work on it when suddenly out of the blue the system died. Turns out I hadn't connected it to the power supply and it was running on battery juice. I had also forgotten that lighweight window managers don't come with elaborate power management tools! What to do?&lt;/p&gt;
&lt;p&gt;In the past when using Openbox/Fluxbox I remember conscripting the Xfce Power manager to do the job. This time I wanted to script at least some of the essential functionality, myself. So I created a python script to do the job. The script notifies the user (via sound and OSD) when the battery is running low and when the battery drops to critical levels automatically initiates shutdown. Also, it will be put the system into standby if it is running on battery and has been inactive (no user input in X) for a certain defined period.&lt;/p&gt;
&lt;p&gt;I wrote it intending to launch it via my .xinitrc script and it utilises the notification daemon so it will only function fully when running inside an X session. I'm using xscreensaver to suspend my screen after a period of inactivity so haven't bothered scripting that facilitiy in. If you want to set this manually you can use xset as described here. Script has been tested to work on my Debian Jessie system but should work on fine on other systemd distros with minimal wrangling.&lt;/p&gt;
&lt;p&gt;The script can be found on my &lt;a href="https://github.com/nakhan98/misc/tree/master/power_man"&gt;github&lt;/a&gt;.&lt;/p&gt;</content><category term="misc"/></entry><entry><title>Debian Jessie</title><link href="//nakhan.net/debian-jessie.html" rel="alternate"/><published>2015-01-19T00:00:00+00:00</published><updated>2015-01-19T00:00:00+00:00</updated><author><name>Nasef Khan</name></author><id>tag:nakhan.net,2015-01-19:/debian-jessie.html</id><summary type="html">&lt;p&gt;So, I'm back to Debian Testing (Jessie) on my main laptop. This is the version where they've controversially introduced systemd under the hood. Haven't done much poking around yet but it still feels like good old Debian to me. I remember the Arch switch to systemd being much more painful …&lt;/p&gt;</summary><content type="html">&lt;p&gt;So, I'm back to Debian Testing (Jessie) on my main laptop. This is the version where they've controversially introduced systemd under the hood. Haven't done much poking around yet but it still feels like good old Debian to me. I remember the Arch switch to systemd being much more painful. I suspect the Debian developers have been hard at work molding systemd to the Debian way of doing thing.&lt;/p&gt;
&lt;p&gt;What wasn't a  pleasant experience was trying to get the Debian installer to play nice with UEFI. In the end I gave up and just disabled secure boot. Don't know who thought up the whole scheme but it's a pain in the backside. Apart from that the install process was painless&lt;/p&gt;
&lt;p&gt;My desktop "environment" is composed of the spectrwm tiling window manager with components yanked from the LXDE desktop (lxterminal, PCManFM, lxappearance etc.). It's probably not to everyone's taste but it works well from my experience:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://web.archive.org/web/20160723172350im_/http://s29.postimg.org/9buxxxsrb/2015_01_18_232001_1366x768_scrot.png" target="_blank"&gt; &lt;img style="max-width: 100%; min-width: 300px; height: auto;" src="https://web.archive.org/web/20160723172350im_/http://s29.postimg.org/9buxxxsrb/2015_01_18_232001_1366x768_scrot.png" alt="" /&gt; &lt;/a&gt;&lt;/p&gt;</content><category term="misc"/></entry></feed>