RSSAmplifier

Blog

Chris Hager

Recent content on Chris Hager

metachris.devRSS feed ↗64 posts

Latest posts

Safe Yolo Mode: Running LLM Agents in VMs with Libvirt and Virsh

This is a guide for isolating LLM agents in virtual machines, using libvirt and virsh on Linux servers. Running LLMs in VMs isolates them from the host system, mitigating numerous security risks such as destructive operations or unauthorized file access (i.e. private keys, secrets, credentials for communication tools). This is particularly important when granting LLM agents broad permissions, like…

What Caught My Eye in January

January 2026: the month AI agents got their own social network and started forming micronations. Also: FOSDEM, ancient engineering, cURL’s war on slop, hard-won lessons on estimation and burnout, and a few other delightful corners of the internet. Add your favorites in the comments! Note: descriptions are LLM-assisted. Topics: Engineering & Tech AI / LLMs Open Source Life & Miscellany…

2025 - Year in review

This post is a look back at 2025: projects, writings, code, books, and a few thoughts on AI, social media, and life.

Sandbox Your AI Dev Tools: A Practical Guide for VMs and Lima

AI coding assistants, npm, pip, and other development tools can run arbitrary code and scripts on your machine, potentially stealing SSH keys, API tokens, wallet keys, sensitive credentials and other private data without you noticing. This guide shows you how to sandbox these tools in isolated VMs using Lima, so you can experiment and develop freely without putting your sensitive data at risk.…

How to Query GitHub for User Contributions in a Specific Timeframe

I needed needed to find all public GitHub repositories a user has contributed to within a specific timeframe, and wanted to share - and record for myself - the API query I learned. This can be a useful for generating reports, tracking progress, analyzing activity over a certain period, and more. Use the GitHub GraphQL API We leverage the GitHub GraphQL API to get the list of public repositories a…

TLS Certificate Cheat Sheet - OpenSSL & Curl

https://collective.flashbots.net/t/tls-certificates-know-how-quick-reference/5292

My Mac Dev Setup and Favorite Tools

How I setup and use my computer and tools for development. I wrote this mostly as a guide for myself, for the next time I setup a computer, and hope it might be useful to others too. I’d love to hear your thoughts, ideas and additional tips in the comments below! Related: How I setup my Terminal and Bash. Contents Mac setup General system setup Favorite apps Keyboard shortcuts Application…

Terminal and Bash - Tips & Tricks

A collection of notes, tips and tricks about how I setup and use my terminal (iTerm2) and shell (Bash). Perhaps you find some of it useful or interesting for your own setup.

Bid cancellations considered harmful

Moved to https://ethresear.ch/t/bid-cancellations-considered-harmful/15500

Block Building inside SGX

Moved to https://writings.flashbots.net/block-building-inside-sgx

Running Geth within SGX: Our Experience, Learnings and Code

Moved to https://writings.flashbots.net/geth-inside-sgx

Securing private keys with a high-performance, threshold signature-based protocol

This post is about the paper “Improving security for users of decentralized exchanges through multiparty computation”, by Robert Annessi and Ethan Fast. The paper introduces an effective algorithm for secure, collaborative signature generation using threshold signatures, and an API-key based client/server protocol that allows user-specific limits and restrictions as well as key…

Creating Go Bindings for Ethereum Smart Contracts

To interact with Ethereum smart contracts in Go programs, you need bindings for the specific type of contract. This post is a quick guide for generating these bindings from various sources: Manually compiled Solidity contract Smart contracts with Truffle (eg. OpenZeppelin contracts ) Compiling a contract on remix.ethereum.org Using the Etherscan ABI API Prebuilt Go bindings

Starting a TypeScript Project in 2021

This is a guide for starting a TypeScript project in 2021 with modern tooling. TypeScript 4 Optionally esbuild to bundle for browsers (and Node.js) Linting with typescript-eslint ( tslint is deprecated) Testing with Jest (and ts-jest ) Publishing a package to npm Continuous integration ( GitHub Actions / GitLab CI ) Automatic API documentation with TypeDoc

PDFx update and new version release (v1.4.1)

PDFx is a tool to extract text, links, references and metadata from PDF files and URLs. Thanks to several contributors the project received a thorough update and was brought into 2021. The new release of today is PDFx v1.4.1 🎉 PDFx works like this:

Starting a TypeScript Project in 2021

Moved to /2021/04/starting-a-typescript-project-in-2021/

MicroPython-Ctl - a TypeScript library for talking to MicroPython devices

I’m happy to introduce MicroPython-Ctl: a TypeScript library for talking to MicroPython devices (such as ESP32/8266, Raspberry Pi Pico, Pyboard, WiPy, and many more). Use micropython-ctl to quickly build apps that interact with MicroPython devices: Websites / webapps, Node.js programs, Electron applications, Visual Studio Code extensions, Mobile apps (eg. with React Native) and more. Connect…

A new version of logzero is released (v1.6) 🎉

logzero is a simple and effective logging library for Python, with colored stream output, logfile, syslog, JSON formatting and much more: https://github.com/metachris/logzero After a really busy period with my second 🐣, I start to find a little bit of time here and there for fun projects. Recently I’ve enjoyed a few evenings maintaining logzero, culminating in a small release today: logzero…

It's been a while!

Oh wow, it’s been about two years since my last post, and oh boy were those eventful! Most notably, I’m now a father of two 🐥🍼. Happy, busy, and frequently getting up way too early for my liking. 😂 Either way, now I seem to find a little bit of time again to hack around and play with interesting things, and even to post about it! (Recently I’ve updated this blog - migrated to…

City of Zion Project Report — June to August 2018

Redirecting to https://medium.com/proof-of-working/city-of-zion-project-report-june-to-august-2018-ea6fa87565ea

NEO dApps review - CoZ first dApps competition

Redirecting to https://medium.com/proof-of-working/coz-first-dapps-competition-dapp-review-3a6b284afaef

How to build an ICO on NEO with the NEX ICO smart contract template

Redirecting to https://medium.com/proof-of-working/how-to-build-an-ico-on-neo-with-the-nex-ico-smart-contract-template-1beac1ff0afd

How to run a private network of the NEO blockchain

logzero - Simplified logging for Python 2 and 3

I’ve just published logzero, a small Python package which simplifies logging with Python 2 and 3. It is easy to use and robust, and heavily inspired by the Tornado web framework. I’ve recently released python-boilerplate.com which included this module as a file, and people have been asking for it to be published as a standalone package. Finally I’ve found some time to do it, and…

How to test Vue.js plugins and extensions

This post shows how to write tests for Vue.js plugins and extensions by creating Vue.js instances, changing state and validating transformation and expected errors, to continuously verify that everything still works after updates, refactorings and merging contributions. While building python-boilerplate.com, I recently created a Vue.js plugin for syntax highlighting (vue-highlightjs), and wanted…

Continuous Deployment: Hugo + Travis CI → GitHub Pages

This post shows how to automate building and deployment of Hugo static websites to GitHub Pages using Travis CI. Builds are automatically triggered when pushing to the Git repository, and deployment when a build on the master branch succeeds. Hugo is a static website generator written in Go, and only requires a single binary. The easiest way to run Hugo in the Travis CI container is by including…

KubeCon Europe 2017 Impressions

Last week I was visiting CloudNativeCon and KubeCon Europe 2017 in Berlin for two days of conference packed with talks. The conference took place in the good ol’ Berlin Congress Center, which brought up good memory on the earlier Chaos Computer Congresses, which used to take place there. This post is a quick recap of my notes and impressions. KubeCon 2017 Keynote Cloud Native Computing…

Interesting facts from the Snapchat IPO filing

Snapchat is going public! And there is lots of interesting data in todays IPO filing. Snap Inc. is a camera company. Users: 158m daily active users, grew 7% last quarter (Instagram has about 400m DAU). Users older than 25 visit Snapchat approximately 12 times per day, on average about 20 minutes each day. Users younger than 25 visited Snapchat over 20 times and spent over 30 minutes on Snapchat…

Vue.js Syntax Highlighting with highlight.js

Everyone loves a good syntax highlighting. This post explains how to use highlight.js for syntax highlighting in a Vue.js application. The method shown here allows syntax highlighting both on original creation of an element as well as on updates to the source-code, using a simple v-highlightjs directive such as this: <pre v-highlightjs><code class='javascript'></code></pre> You can see a live…

How to install Node.js 6.x Long-Term Support (LTS) on Ubuntu/Debian and CentOS

Node.js 6.x is the current Node.js long-term support (LTS) release, with Node.js v6.9.4 being the most recent release as of time of writing. This guide shows a quick and reliable way to install the current Node.js 6.x LTS version (including npm) on Ubuntu/Debian and CentOS. console.log('Hello World'); We will use the system package manager (eg. apt or yum) to install Node.js 6.x, to be able to…

How to install Node.js 7.x on Ubuntu/Debian and CentOS

Node.js 7.x is the current stable release of the Node.js, which is actively maintained in parallel to Node.js 6.x Long-Term Support (LTS). At the moment, the latest version is Node.js v7.4.0, and you can find the Node.js v7.x Changelog here on Github. This guide shows a quick and reliable way to install the current Node.js 7.x version (including npm) on Ubuntu/Debian and CentOS, using the system…

Custom Errors in TypeScript 2.1

TypeScript 2.1 introduced a number of breaking changes, among them that &ldquo;Extending built-ins like Error, Array, and Map may no longer work&rdquo;. For a subclass like the following: class FooError extends Error { constructor(m: string) { super(m); } sayHello() { return 'hello ' + this.message; } } methods may be undefined on objects returned by constructing these subclasses, so calling…

Great Talks and Presentations at 33C3

The Chaos Computer Congress is Europe&rsquo;s leading hacker and tech community conference, taking place annualy in Hamburg, Germany between Christmas and New Year. This year was the 33rd time (hence 33C3), and as usual featured a large number of amazing talks and presentations. My personal favorites Making Technology Inclusive Through Papercraft and Sound - Introducing the Love to Code Platform,…

Python Utilities by Peter Norvig

Peter Norvig, the famous American computer scientist and Director of Research at Google Inc., participated in this year&rsquo;s Advent of Code (a series of small programming puzzles), and shared his experience in an interesting blog post. The post starts with this amazing collection of Python utility functions, which may also be useful for your next project: # Python 3.x import re import numpy as…

Python Thread Pool

A thread pool is a group of pre-instantiated, idle threads which stand ready to be given work. These are often preferred over instantiating new threads for each task when there is a large number of (short) tasks to be done rather than a small number of long ones. Suppose you want do download 1000s of documents from the internet, but only have resources for downloading 50 at a time. The solution is…

How to install Qt 5.6 and PyQt5 in a Python 3.4 virtual environment on Mac OS X and Linux

This is a simple guide on installing the latest Qt (currently 5.6) and PyQt5 on Mac OS X 10.11 (El Capitan) and Linux with Python 3.4, inside a virtual environment. Installation Steps Python 3 Xcode and command-line tools Qt libraries Virtual environment SIP Python package PyQt5 Python package Python 3 First of all, make sure that Python 3 is available on your system. You can easily check this by…

Find broken hyperlinks in a PDF document with PDFx

PDFx is a free command-line tool to extract references, links and metadata from PDF files. You can also use it to find broken links in a PDF file, using pdfx -c: For each URL and PDF reference, pdfx performs a HEAD request and checks the status code. It there are broken links, PDFx print the link with the page number where the link was found in the original pdf: $ pdfx https://weakdh.

Free Transactional Email Services - The Best Alternatives to Mandrill & Co.

Mandrill, the beloved-by-many transactional email service, recently announced that it will switch to a paid-only model under the MailChimp umbrella. This came as a surprise to many developers who used them for sending emails for free from various servers and backends. This post provides a round-up of some of the more popular Mandrill alternatives. Free Transactional Email Providers This section…

How to Optimize Wordpress Performance with nginx and WP Super Cache

This is a simple and effective method how to serve Wordpress pages blazingly fast: produce static HTML files with WP Super Cache, and serve them directly with nginx. WP Super Cache (on Github) is an immensely popular, official Wordpress caching plugin with more than 1 million active installations. Basically the plugin produces static html pages of your posts and pages, and anonymous users can…

Comparison of 10 ACME / Let's Encrypt Clients

Let&rsquo;s Encrypt is a new certificate authority backed by Mozilla, Akamai, EFF, Facebook and others, which provides free, automated SSL/TLS certificates. The public beta started on December 3, 2015 and a whole lot of certificates have been issued already: Several clients to automate issuing, renewing and revoking certificates have been released both by the community and the Let&rsquo;s Encrypt…

Creating standalone Mac OS X applications with Python and py2app

In this tutorial we&rsquo;ll be using py2app to create a standalone OSX application from a Python 2 or 3 source code with a simple Tkinter user interface. "py2app is a Python setuptools command which will allow you to make standalone application bundles and plugins from Python scripts. py2app is similar in purpose and design to py2exe for Windows." Relevant links about py2app: Documentation Source…

Python Helpers for String/Unicode Encoding, Decoding and Printing

String encoding and decoding as well as encoding detection can be a headache, more so in Python 2 than in Python 3. Here are two little helpers which are used in PDFx, the PDF metadata and reference extractor: make_compat_str - decode any kind of bytes/str into an unicode object print_to_console - print (unicode) strings to any kind of console (even windows with cp437, etc.) All of this code is in…

Machine Learning on Amazon AWS GPU Instances

Machine learning algorithms regularly utilize GPUs to parallelize computations, and Amazon AWS GPU Instances provide cheap and on-demand access to capable virtual servers with NVIDIA GPUs. GPU Instances come in two flavors: G2.2xlarge and G2.8xlarge: Model GPUs vCPU Mem (GiB) SSD Storage (GB) g2.2xlarge 1 8 15 1 x 60 g2.8xlarge 4 32 60 2 x 120 The GPU instances feature Intel Xeon E5-2670 (Sandy…

David Beazley - Python Concurrency From the Ground Up (LIVE @PyCon 2015)

Great talk and engaging live coding session &ldquo;Python Concurrency From the Ground Up&rdquo; by David Beazley at PyCon 2015! Recommended 47 minutes watch. A few selected quotes: The fact that he walked in and did this demo from scratch while keeping the packed room engaged was incredible. A more comprehensive quote: David Beazley's 2015 PyCon talk on concurrency was one of my favorite talks of…

How to install Node.js 5.x on CentOS and Ubuntu/Debian

Node.js v5.x is deprecated. Take a look at the current instructions on how to install Node.js 6.x Long-Term Support (LTS) and Node.js 7.x. Node.js v5.0.0 (stable) was released today, just a month after the v4.x long-term-support (LTS) release! Here is a quick and easy way to install the current Node.js 5.x (including npm) on CentOS and Ubuntu/Debian. Installing Node.js 5.x on CentOS 7 The easiest…

PDFx v1.0 - Extract metadata and URLs from PDFs, and download all referenced PDFs

I just released PDFx version 1.0, a Python tool and library to extract metadata and URLs from PDFs, and to automatically download all referenced PDFs. The project is released under the Apache license with the source code on Github! Features Extract metadata and PDF URLs from a given PDF (file or URL) Download all PDFs referenced in the original PDF Works with local and online pdfs Use as…

How to install Node.js 4.x (LTS) on CentOS

Node.js v4.x is deprecated. Take a look at the current instructions on how to install Node.js 6.x Long-Term Support (LTS) and Node.js 7.x. Recently io.js and node.js merged again into a single codebase in Node v4.0.0. The fork happened in December 2014 and io.js has seen rapid improvements and fast uptake of upstream V8 features. Now the merge has happened, and with it comes a lot of features from…

Retrofit 2.0 Samples

This post is about using Retrofit 2.0 (beta) to consume HTTP based APIs. Retrofit is a great and popular API client library for Java (and by extension also for Android) developed by Square. Here&rsquo;s a few links to start things off: Retrofit Homepage Retrofit Source on Github Retrofit Javadoc Blog post about Retrofit 2.0 Source code with samples for this post is available on Github. Retrofit…

Yet Another DMCA Takedown

Another DMCA takedown of one of my Android apps. This time initiated by The New York Times Company for a three year old app titled &ldquo;NYTimes Article Search&rdquo;. Instead of having their lawyers send the DMCA notice to Google which immediately suspends the respective app, they could have just sent me an email and I’d have changed the name immediately. Quite sad how the world is driven by…

App Engine Boilerplate 2.0 – Using html5-boilerplate v2 on Google App Engine

Just a year ago Paul Irish and several contributors started working on html5-boilerplate, a popular repository of boilerplate and best practices for creating cross-browser compatible, html5-enabled websites. Thanks to the efforts of many front-end developers and researchers who have spent countless hours on developing and evolving best practices, html5 boilerplate is rapidly maturing and…