Skip to content

Instantly share code, notes, and snippets.

View tamasgal's full-sized avatar

Tamas Gal tamasgal

View GitHub Profile
@tamasgal
tamasgal / _.md
Created March 13, 2014 23:52
Tributary inlet
@tamasgal
tamasgal / hdf5_simple.cpp
Created March 15, 2016 14:04 — forked from YukiSakamoto/hdf5_simple.cpp
simple example to write hdf5 using c++.
#include <string>
#include <iostream>
#include "H5Cpp.h"
#define MAX_NAME_LENGTH 32
const std::string FileName("SimpleCompound.h5");
const std::string DatasetName("PersonalInformation");
const std::string member_age("Age");
const std::string member_sex("Sex");
const std::string member_name("Name");
@tamasgal
tamasgal / Jenkinsfile
Created April 12, 2018 06:45 — forked from oifland/Jenkinsfile
Loops in Jenkinsfiles
// Related to https://issues.jenkins-ci.org/browse/JENKINS-26481
abcs = ['a', 'b', 'c']
node('master') {
stage('Test 1: loop of echo statements') {
echo_all(abcs)
}
stage('Test 2: loop of sh commands') {
@tamasgal
tamasgal / Jenkinsfile
Created May 29, 2018 15:26
Getting a list of filenames in a given directory
#!groovy
import static groovy.io.FileType.FILES
node('master') {
FILES_DIR = './foo'
cleanWs()
sh """
mkdir foo
touch foo/bar1
@tamasgal
tamasgal / gcn_pipeline.py
Last active February 10, 2020 19:38
ThePipe example for gcn
#!/usr/bin/env python
from queue import Queue, Empty
import gcn
from grbfunk import handler
import coloredlogs, logging
import telegram
import os
import yaml
@tamasgal
tamasgal / Jenkinsfile
Created April 27, 2018 11:51
Jenkinsfile for parallel Docker images (Python)
#!groovy
def docker_images = ["python:3.5.5", "python:3.6.4", "python:3.6.5"]
def get_stages(docker_image) {
stages = {
docker.image(docker_image).inside {
// If I use this variable as the Virtual Env Folder,
// I get "permission denied" messages from pip, since it tries
// to install into /usr/local/... instead of the pyenv folder!
// def PYTHON_VENV = docker_image.replaceAll('[:.]', '') + 'venv'
@tamasgal
tamasgal / README.md
Created June 26, 2021 15:07 — forked from goll/README.md
Docker nftables configuration for Debian 10
@tamasgal
tamasgal / ParallelDockerJenkinsfile
Last active December 26, 2023 12:41
Looping through a list of docker images and execute their stages in parallel. More info here: https://stackoverflow.com/questions/49782267/running-multiple-docker-containers-from-a-single-jenkinsfile
def docker_images = ["python:2.7.14", "python:3.5.4", "python:3.6.2"]
def get_stages(docker_image) {
stages = {
docker.image(docker_image).inside {
stage("${docker_image}") {
echo 'Running in ${docker_image}'
}
stage("Stage A") {
switch (docker_image) {