Skip to content

Instantly share code, notes, and snippets.

@SethosII
SethosII / easybuild_test_report_11843_easybuilders_preasybuild-easyconfigs_20211208-UTC-14-12-38.md
Created January 8, 2021 14:12
EasyBuild test report for easybuilders/easybuild-easyconfigs PR #11843

Test report for easybuilders/easybuild-easyconfigs#11843

Test result

Build succeeded for 1 out of 1 (1 easyconfigs in total)

Overview of tested easyconfigs (in order)

  • SUCCESS freebayes-1.3.2-foss-2018b.eb

Time info

  • start: Fri, 08 Jan 2021 14:01:39 +0000 (UTC)
@SethosII
SethosII / easybuild_test_report_11843_easybuilders_preasybuild-easyconfigs_20204108-UTC-08-41-12.md
Created December 8, 2020 08:41
EasyBuild test report for easybuilders/easybuild-easyconfigs PR #11843

Test report for easybuilders/easybuild-easyconfigs#11843

Test result

Build succeeded for 1 out of 1 (1 easyconfigs in total)

Overview of tested easyconfigs (in order)

  • SUCCESS freebayes-1.3.2-foss-2018b.eb

Time info

  • start: Tue, 08 Dec 2020 08:31:04 +0000 (UTC)
@SethosII
SethosII / cleanup-ansible-backups.sh
Last active July 29, 2017 14:52
Ansible has the option to create backup files when something is changed. All of them have a suffix with the same structure.
# the regex is basically everything ending with: .arbitrarynumber.YYYY-MM-DD@hh:mm:ss~
sudo find / -regextype egrep -regex '.*.[0-9]*.[0-9]{4}-[0-9]{2}-[0-9]{2}@[0-9]{2}:[0-9]{2}:[0-9]{2}~' | xargs -n 1 rm
@SethosII
SethosII / reboot.yaml
Last active June 8, 2017 20:32
Ansible tasks to reboot hosts and wait for them to come back. Originally from https://support.ansible.com/hc/en-us/articles/201958037-Reboot-a-server-and-wait-for-it-to-come-back, but this article is no longer available. See also https://sethosii.github.io/2017/04/29/ansbile-reboot.html.
- name: "reboot hosts"
shell: "sleep 2 && shutdown -r now 'Reboot triggered by Ansible'" # sleep 2 is needed, else this task might fail
async: "1" # run asynchronously
poll: "0" # don't ask for the status of the command, just fire and forget
ignore_errors: yes # this command will get cut off by the reboot, so ignore errors
- name: "wait for hosts to come up again"
wait_for:
host: "{{ inventory_hostname }}"
port: "22" # wait for ssh as this is what is needed for ansible
state: "started"
@SethosII
SethosII / xkcd.sh
Last active November 16, 2019 20:39
Download all of the xkcd comics
#!/bin/bash
TOTAL=$(curl https://xkcd.com/info.0.json 2> /dev/null | grep -Po '"num": [0-9]+' | grep -Po '[0-9]+')
# download JSON and image file
echo "downloading ..."
for i in $(seq 1 $TOTAL)
do
echo -ne "\r$i/$TOTAL"