Skip to content

Instantly share code, notes, and snippets.

View simonmoulds's full-sized avatar

Simon Moulds simonmoulds

View GitHub Profile
@simonmoulds
simonmoulds / download-nrfa-data.py
Last active January 21, 2024 13:51
download-nrfa-data
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import urllib.request
import json
import pandas as pd
# The base URL to access the NFRA API
BASE_URL = "https://nrfaapps.ceh.ac.uk/nrfa/ws"
@simonmoulds
simonmoulds / delete_git_submodule.md
Created August 3, 2020 15:04 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule

Lisflood Docker image

The following is adapted from the Lisflood user guide

Setup rootless docker

Ensure the prerequisites are met. In particular, newuidmap and newgidmap need to be installed on the host machine (check with which newuidmap and which newgidmap: if these commands list a file then they're instaled). Then do the following to make sure you have at least 65,536 subordinate UIDs/GIDs. The commands to do so, with example output, are shown here:

id -u
1001
$ whoami
testuser