0

Polynomial fitting by linear least squares

I made a repository of C++ code that runs polynomial fitting by linear least squares.

Advertisements
0

use Meld for git diff

  1. make a script, git-meld.sh
    #!/bin/bash
    meld “$2” “$5” > /dev/null 2>&1
  2. put the script in the bin directory
    sudo mv git-meld.sh /usr/local/bin/
    sudo chmod +x /usr/local/bin/git-meld.sh
  3. add diff settings in the $HOME/.gitconfig
    [diff]
        external = /usr/local/bin/git-meld.sh
0

github: upload an empty directory

It’s technically impossible to commit an empty directory to github because github only manages files. However, there exists a practical solution that stores a .gitignore file inside a directory and commit the .gitignore file so that the directory is commited. The contents of the .gitignore is as

# ignore everything except .gitignore and folders that I care about:
*
!images*
!.gitignore