Roland's homepage

My random knot in the Web

Older articles (13/27)

  1. Converting RCS history to git

    Before the rise of git, I used rcs as my version control system. Because I want to standardize on git, I am slowly converting old repositories.

    In this article, as an example, I’ll be converting my old perl scripts in ~/src/perl.

    date: 2017-08-13
    modified: 2022-01-14
    reading time: 2 min.
    category: problems
    tags: RCS git
  2. Doing calculations with Python

    As an engineer I do a lot of calculations. These can be done with pen and paper and a calculator, in an IPython notebook or in a throwaway spreadsheet. All of these methods have shortcomings, though.

    Pen and paper is hard to share and (in my case) hard for others to read. In IPython you can assign the results of calculations to a variable, but you have to perform a separate action to display them. And spreadsheets in general show you the results but not the calculations.

    So I wrote a simple function in Python to help me with that. Using this function I can print both simple assignments and relatively complex calculations. And it shows both the calculation and the result.

  3. Structures in Python

    Sometimes I miss the C’s plain old struct in Python.

    Of course Python has dictionaries, but I prefer to write a.b over a['b'].

    Here are several ways of doing something akin to a struct in Python.

  4. Building gphoto2-ffi on FreeBSD

    Download

    Clone the repository from https://github.com/jbaiter/gphoto2-cffi.

    > cd ~/github
    > git clone https://github.com/jbaiter/gphoto2-cffi
    

    Build …

    date: 2017-04-18
    reading time: 1 min.
    category: freebsd
  5. Removing big files from git history

    By accident I checked 60-odd full-size photographs into the git history of my website. I shrunk them in a next commit, but the history was still there leading to a bloated .git directory. This took a lot of time when making backups. This documents how I cleaned up this mess.

    date: 2017-02-07
    reading time: 2 min.
    category: howto
    tags: git

←  Page 12 Page 13 / 27 Page 14 →