Skip to content

Instantly share code, notes, and snippets.

@victorhcm
victorhcm / slurm_utils.sh
Last active May 2, 2019 02:47
SLURM utils. Add to your .bashrc
# =================================================
# SLURM UTILS
# =================================================
# sbatlog: runs sbatch and automatically tail -f slurm-$number.out
function sbatlog
{
result=$(command sbatch "$@")
outputid=$(echo $result | awk -F' ' '{print $NF}')
# fileout="slurm-$outputid.out" # assumes default file output name
  1. Install CMake 3.5.2 on CentOS 7

    Download Source distributions cmake-3.5.2.tar.gz from https://cmake.org/download/
    ./bootstrap
    gmake
    sudo gmake install
    
  2. Install libgpuarray on Centos 7

@victorhcm
victorhcm / sbatlog.py
Last active January 22, 2022 19:09
A slurm sbatch wrapper that automatically opens the output file
#!/bin/python3
import os
import sys
import subprocess
import re
def run():
arguments = sys.argv[1:]
@victorhcm
victorhcm / readme.md
Created July 5, 2024 13:54 — forked from maxivak/readme.md
Restore repo from Gitlab bundle file

Gitlab exports repositories to tar archive which contains .bundle files.

We have repo.bundle file and we want to restore files from it.

  • create bare repo from bundle file
git clone --mirror myrepo.bundle my.git
@victorhcm
victorhcm / README.md
Created July 7, 2024 03:29 — forked from paulgregg/README.md
Converting a gitlab export to simple git repo

Converting a gitlab export to simple git repo

Gitlab exports a tar.gz file which contains a file called project.bundle. We can convert this file into a normal git repo using the following steps:

Extract the project.bundle file

$ tar xvfz GitLabExport.gz