Skip to content

Instantly share code, notes, and snippets.

View icaoberg's full-sized avatar
:bowtie:
Coding…

icaoberg icaoberg

:bowtie:
Coding…
View GitHub Profile
@icaoberg
icaoberg / blastn-example.sh
Created February 11, 2026 23:48
[PSC] BLAST example #bridges2
#!/bin/bash
#SBATCH --job-name=blast_demo
#SBATCH --output=blast_%j.out
#SBATCH --error=blast_%j.err
#SBATCH --time=02:00:00
#SBATCH -n 8
#SBATCH --mem=16000M
#SBATCH -p RM-shared
###############################################################################
@icaoberg
icaoberg / rrename.sh
Last active January 28, 2025 10:13
Rename file with a random filename using uuidgen
#!/bin/bash
# Enable nullglob so patterns that don't match anything expand to null
shopt -s nullglob
# Check if a file name is provided as an argument
if [ -z "$1" ]; then
echo "Error: No file specified. Please provide a file name as an argument."
exit 1
fi
@icaoberg
icaoberg / asana.py
Last active January 15, 2025 09:50
Top 10 Asana Tasks
import os
import asana
from pathlib import Path
from tqdm import tqdm
import pandas as pd
import warnings
warnings.filterwarnings("ignore")
# This script fetches tasks from Asana and displays the top 10 incomplete tasks with due dates.
@icaoberg
icaoberg / sq
Last active January 15, 2025 09:49
A better version of squeue (for me)
#!/bin/bash
# Alias: sq
# This alias is a shorthand for a customized display of job information using the 'squeue' command.
# Command:
# squeue -o "%.18i %.9P %.50j %.8u %.2t %.10M %.6D %R"
# Description of the 'squeue' options:
# - 'squeue': A command used to view information about jobs in the Slurm workload manager.
@icaoberg
icaoberg / script.sh
Last active December 26, 2021 02:42
Fill metadata on mp3 files
for F in *.mp3
do
ALBUM='Room Service (Extended Version)'
ARTIST='Roxette'
SONG=$(basename $F .mp3 | cut -d'-' -f2-25 | xargs -0)
GENRE='Pop'
YEAR=2020
mid3v2 -a "$ARTIST" -A "$ALBUM" -t "$SONG" -g $GENRE -y $YEAR $F
done
@icaoberg
icaoberg / README.md
Created June 3, 2021 19:15
README.md template

singularity-PACKAGE

Singularity recipe for PACKAGE.

Installing the container on Bridges 2

Copy the

  • SIF file
  • and the PACKAGE script

to /opt/packages/PACKAGE/VERSION.

@icaoberg
icaoberg / Singularity
Created June 3, 2021 02:31
Singularity recipe for spellcheck
Bootstrap: docker
From: debian:latest
%labels
AUTHOR icaoberg
MAINTAINER icaoberg@psc.edu
WEBSITE https://www.andrew.cmu.edu/~icaoberg
VERSION 0.5.0
%post
@icaoberg
icaoberg / Singularity
Created June 2, 2021 21:37
Singularity recipe for tokei
Bootstrap: docker
From: alpine:edge
%labels
AUTHOR icaoberg
MAINTAINER icaoberg@psc.edu
WEBSITE https://www.andrew.cmu.edu/~icaoberg
VERSION 12.1.2
%post
@icaoberg
icaoberg / Singularity
Last active June 2, 2021 21:26
Singularity recipe for hyperfine
Bootstrap: docker
From: alpine:edge
%labels
AUTHOR icaoberg
MAINTAINER icaoberg@psc.edu
WEBSITE https://www.andrew.cmu.edu/~icaoberg
VERSION 1.11.0
%post
@icaoberg
icaoberg / bioinformatics
Last active May 26, 2021 19:45
Simple script that lists modulefiles in the 'Biological Sciences' category
#!/bin/bash
module keywords "Biological Sciences"