Creează un cont pentru a te abona la acest blog și a-i urmări articolele pe pagina Lectură.
-
This is the blog post version of a presentation that I gave at the PostgreSQL Edinburgh Meetup in February 2026.
-
There are lots of ways to add Ruff to Vim: Ruff’s own docs recommend using the vim-lsp plugin (which adds Language Server Protocol support to Vim), coc-pyright, or efm-langserver.
-
Helix is a neat little vim-like, modal, terminal text editor (written in Rust!)
-
See also: :help packages Installing plugins and colorschemes Here’s how you’d install the vim-commentary plugin as a package: $ git clone https://github.com/tpope/vim-commentary.git ~/.vim/pack/plugins/start/vim-commentary Now when you launch Vim the com…
-
Password managers can be secure and convenient but they’re also dangerous tools in a couple of important ways: By encouraging you to put all your passwords and other sensitive information in one place password managers create the possibility of a catastro…
-
I don’t use Bitwarden’s encrypted export feature because as far as I know those exports are only good for re-importing into a Bitwarden account.
-
Todo.txt is a bash script for managing a todo list in a plain text todo.txt file: $ todo.sh add Go grocery shopping 1 Go grocery shopping TODO: 1 added. $ todo.sh add Feed the cat 2 Feed the cat TODO: 2 added. $ todo.sh add Feed the dog 3 Feed the dog TOD…
-
When I want to publish a new release of one of my Python packages I just browse to my release.yml workflow in the Actions tab and click the Run workflow button: This runs a GitHub Actions workflow that increments the patch version number, creates a new Gi…
-
Updated 31st March 2025: the RESTIC_HOST environment variable actually is recognised by restic itself, but until recently not by the restic forget command.
-
isync is quick to install and configure and works great.
-
tmux’s window-style setting changes the default foreground and background colours for windows, and you can use it to toggle your terminal between light-on-dark and dark-on-light themes: $ # Change the current window (all panes) to light background. $ tmux…
-
tmux’s default key sequence to enter copy mode and begin a search of the terminal history/scrollback is pretty awkward: Ctrl + b [ Ctrl + r if you’re using the default emacs-style copy mode bindings, or Ctrl + b [ ?
-
Key bindings Add the snippet below to your ~/.tmux.conf file to get browser-like keyboard shortcuts for working with tabs (tmux calls them “windows”): Ctrl + t Open a new tab.
-
TLDR set foo bar sets an option for the current window or session. set -g foo bar sets an option globally (for all windows and sessions that don’t have a local setting for that option).
-
To list all current key bindings, including any custom bindings you’ve added and bindings added by plugins: Ctrl + b ?
-
TLDR Install Tmux Plugin Manager and tmux-yank, then paste the config below into your ~/.tmux.conf file and reload it (tmux source ~/.tmux.conf) to get copy and paste to work like it would in a normal app: tmux mouse mode enabled Selecting text with the m…
-
vim-indent-object is a great Vim plugin that adds an i text object for an indented block of text, very useful in Python!
-
Vim has a comprehensive built-in manual.
-
commentary.vim provides several ways to comment or uncomment lines.
-
Breadcrumbs help users locate themselves within the hierarchy of your site.
-
This is mostly here as a reference to remind myself of how this works on the rare occassions when I need to work on some Liquid templates and need to re-learn this.
-
It isn’t wonderfully well documented in Python that the builtin Exception class takes any number of positional arguments (pargs) and uses them to provide __str__() and __repr__() methods and pickling support.
-
A lot of the details are in the speaker notes.
-
This post assumes some knowledge of tox.
-
tox is a great tool for standardising and automating any development task that benefits from being run in an isolated virtualenv.
-
See also: The unattended-upgrade package List of all files that are installed when you install unattended-upgrade man unattended-upgrade less /usr/share/doc/unattended-upgrades/README.md.gz, after you’ve done sudo apt install unattended-upgrade The ArchWi…
-
Thunderbird actually has fairly complete keyboard shortcuts.
-
The Hypothesis web annotation client uses PDF fingerprints to identify PDFs independent of their URLs.
-
This post covers one final technique that’s used in the Hypothesis tests: matcher objects.
-
The first post about mocks covered the basics of how to use Python’s mock library.
-
In the fixtures post we saw that usefixtures is a way for a test to use a fixture without taking it as an argument: @pytest.mark.usefixtures('routes') def test_something(): ...
-
The first post about mocks covered the basics of how to use Python’s mock library.
-
This post covers mock.sentinel, a small bonus feature of the mock library that’s used fairly often in the Hypothesis tests. mock.sentinel is a handy object for creating unique, opaque, named objects for use in tests.
-
In The Problem with Mocks we discussed some of the potential problems with mock-based tests.
-
Along with factories, parametrize and fixtures, one more thing that you’ll see a lot of in Hypothesis’s Python tests that you probably won’t know from non-test Python code are these things called mocks, which we’ll look at in this post.
-
In Basic pytest Fixtures we saw that fixtures are pytest’s alternative to setup() and teardown() methods or to test helper functions.
-
This post covers the basics of pytest fixtures and how we use them at Hypothesis.
-
This post covers testing multiple test cases at once using @pytest.mark.parametrize().
-
Previously we tested that the validate_url() function returns the given URL if it’s a valid URL.
-
Factories are a really quick and easy way to create realistic objects to use in your tests.
-
The tests that we’ve written so far (see Writing Simple Python Unit Tests) have been simple enough to fit in a single line of code: def test_validate_url_returns_an_http_url_unmodified(): assert validate_url('https://github.com/jimsmith') == 'https://…
-
This post covers how to write your first, very simple Python unit tests.
-
This post briefly covers some tools for debugging failing tests when using pytest.
-
This post covers running the tests and if you want to try out the example commands you should have a Hypothesis dev install.
-
This is the index page for a series of posts about our approach to Python unit tests at Hypothesis: Running the Hypothesis Python Tests Debugging Failing Tests with pytest Writing Simple Python Unit Tests Arrange, Act, Assert Python Test Factories with fa…
-
See also: This post was cross-posted to the Hypothesis blog Discussion of this post on MetaFilter This is a write-up of some research that I did for a session with our dev team at Hypothesis about how to make our code reviews a more pleasant and empowering
-
This is a guide to installing the blog engine Pyblosxom on Ubuntu, and deploying it with Gunicorn and Nginx.
-
I have a private GitHub repository that I keep all my config files in.
-
deadoralive is a broken link checker service that works with any site that implements its simple API. ckanext-deadoralive is a CKAN plugin that implements the API for CKAN sites.
-
ckanext-deadoralive is a new broken link checking plugin for CKAN.