Skip to content

Instantly share code, notes, and snippets.

@pja237
pja237 / gist:6d97895bc606e5d4e2d0ad1fb2e58840
Created June 8, 2022 21:22
PoC continuation for matrixslurmbot, this code then sends to the received roomID a job message
package main
import (
"flag"
"fmt"
"log"
"maunium.net/go/mautrix"
"maunium.net/go/mautrix/id"
)
@pja237
pja237 / matrixSlurmBot.go
Created June 8, 2022 21:19
PoC of a matrix bot which on room invite joins and sends the message with the sbatch --mail-user switch with roomID. `go run matrixSlurmBot.go`
package main
import (
"fmt"
"log"
"maunium.net/go/mautrix"
"maunium.net/go/mautrix/event"
)
@pja237
pja237 / migrate_packages.R
Created June 11, 2021 13:20
Migrating packages between R installations
### Open old version of R and type:
packages.file <- "Rpackages.RData"
a <- installed.packages()
my.packages <- a[,"Package"]
save(my.packages, file = packages.file)
### Open new version of R and type:
@pja237
pja237 / mempoc.c
Created February 24, 2021 12:57
mempoc for singularity-cgroups issue
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/wait.h>
#define G 1073741824L