Skip to content

Instantly share code, notes, and snippets.

Avatar

Niels Gandraß ngandrass

View GitHub Profile
@ngandrass
ngandrass / .gitlab-ci.yml
Created May 15, 2022
Simple GitLab CI/CD .gitlab-ci.yml configuration for Gradle (Java / JDK 17) projects. With Docker build and push to repository container registry.
View .gitlab-ci.yml
image: gradle:7.4-jdk17-alpine
stages:
- build
- test
- packaging
# Disable the Gradle daemon for Continuous Integration servers as correctness
# is usually a priority over speed in CI environments. Using a fresh
# runtime for each build is more reliable since the runtime is completely
@ngandrass
ngandrass / pdf-rotate-aliases.bash
Created Jan 19, 2022
bash/zsh shell aliases for PDF rotation via pdfjam: pdf90, pdf180, pdf270
View pdf-rotate-aliases.bash
# Alias definitions to rotate PDF documents
# These useful aliases were removed from pdfjam since version 3.02
alias pdf90="pdfjam --landscape --angle 90"
alias pdf180="pdfjam --angle 180"
alias pdf270="pdfjam --landscape --angle 270"
@ngandrass
ngandrass / spincheck.sh
Created Sep 20, 2020
FreeNAS / camcontrol disk spindown check shell script with logging
View spincheck.sh
#!/bin/sh
###########################################################################
# spincheck.sh
#
# Determines the power status of given disks without waking them through
# usage of smartctl.
#
# Author: Niels Gandrass
# Version: 1.0
# Since: 15.05.2017
@ngandrass
ngandrass / to_utm.vba
Created May 13, 2020 — forked from kissmygritts/to_utm.vba
VBA lat long to UTM conversion
View to_utm.vba
Function to_utm(x, y) As Collection
Dim coordinates As Collection
Set coordinates = New Collection
E = 0.00669438
R = 6378137
K0 = 0.9996
E2 = E * E
@ngandrass
ngandrass / update_git_mirrors.sh
Created Feb 8, 2018
Mirror and update git/GitHub repository mirrors via a bash script
View update_git_mirrors.sh
#!/usr/bin/env bash
# Updates all git repository mirrors that sit in current
# directory with a folder name ending on .git.
#
# Also allows to add repositories. See usage.
#
# To remove a mirrored repository simply delete the folder.
function print_usage() {