← Înapoi la Urmăritori

Cel mai recent articol

Ultima verificare

Urmăritori 0 urmăritori
Articole: 55
  1. This is the blog post version of a presentation that I gave at the PostgreSQL Edinburgh Meetup in February 2026.

  2. 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.

  3. Helix is a neat little vim-like, modal, terminal text editor (written in Rust!)

  4. 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…

  5. How I Use Bitwarden

    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…

  6. 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.

  7. Todo.txt

    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…

  8. 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…

  9. Updated 31st March 2025: the RESTIC_HOST environment variable actually is recognised by restic itself, but until recently not by the restic forget command.

  10. isync is quick to install and configure and works great.

  11. 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…

  12. 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 [ ?

  13. 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.

  14. 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).

  15. To list all current key bindings, including any custom bindings you’ve added and bindings added by plugins: Ctrl + b ?

  16. 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…

  17. vim-indent-object is a great Vim plugin that adds an i text object for an indented block of text, very useful in Python!

  18. Vim has a comprehensive built-in manual.

  19. commentary.vim provides several ways to comment or uncomment lines.

  20. Breadcrumbs help users locate themselves within the hierarchy of your site.

  21. 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.

  22. 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.

  23. A lot of the details are in the speaker notes.

  24. This post assumes some knowledge of tox.

  25. tox is a great tool for standardising and automating any development task that benefits from being run in an isolated virtualenv.

  26. 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…

  27. Thunderbird actually has fairly complete keyboard shortcuts.

  28. PDF Fingerprinting

    The Hypothesis web annotation client uses PDF fingerprints to identify PDFs independent of their URLs.

  29. This post covers one final technique that’s used in the Hypothesis tests: matcher objects.

  30. The first post about mocks covered the basics of how to use Python’s mock library.

  31. 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(): ...

  32. The first post about mocks covered the basics of how to use Python’s mock library.

  33. 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.

  34. In The Problem with Mocks we discussed some of the potential problems with mock-based tests.

  35. 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.

  36. In Basic pytest Fixtures we saw that fixtures are pytest’s alternative to setup() and teardown() methods or to test helper functions.

  37. This post covers the basics of pytest fixtures and how we use them at Hypothesis.

  38. This post covers testing multiple test cases at once using @pytest.mark.parametrize().

  39. Previously we tested that the validate_url() function returns the given URL if it’s a valid URL.

  40. Factories are a really quick and easy way to create realistic objects to use in your tests.

  41. 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://…

  42. This post covers how to write your first, very simple Python unit tests.

  43. This post briefly covers some tools for debugging failing tests when using pytest.

  44. This post covers running the tests and if you want to try out the example commands you should have a Hypothesis dev install.

  45. 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…

  46. Code Review

    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

  47. This is a guide to installing the blog engine Pyblosxom on Ubuntu, and deploying it with Gunicorn and Nginx.

  48. git-crypt

    I have a private GitHub repository that I keep all my config files in.

  49. 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.

  50. ckanext-deadoralive is a new broken link checking plugin for CKAN.