Skip to content

Instantly share code, notes, and snippets.

View matthiasbalke's full-sized avatar

Matthias Balke matthiasbalke

  • Germany
View GitHub Profile
@bene-we
bene-we / README.md
Last active September 8, 2025 17:58
Calculate the age of a person and write it to the event's description in your birthday calendar using Google Apps Script

Calculate the age of a person and write it to the event's description in your birthday calendar using Google Apps Script

This script uses Google Apps Script to access one's Google Calendar and calculate the age on a person's birthday. In the best case you have a custom calendar where your birthdays are stored at. If not, uncomment line 20 and use the filter function at the bottom.

Steps to setup everything

  1. Head to https://script.google.com/home/my and create a new project. Rename the existing file Code.gs to your liking and paste the code from calculateAge.gs.
  2. Paste your calendar ID in line 9 (you can find it in the Google Calendar Settings)
  3. Make sure to add the birth year of a person to the location field (or customize the script)
  4. Customize the message in line 36
@vishnuhd
vishnuhd / localstorage-docker-desktop.md
Last active February 2, 2026 22:46
To create a persistent volume on local hard drive with docker-desktop

StorageClass

apiVersion: storage.k8s.io/v1beta1
kind: StorageClass
metadata:
  name: localstorage
provisioner: docker.io/hostpath
@carceneaux
carceneaux / remove_gitlab_artifacts.sh
Last active August 22, 2025 14:55
Script for removing GitLab Job Artifacts.
#!/bin/bash
#
# Written by Chris Arceneaux
# GitHub: https://github.com/carceneaux
# Email: carcenea@gmail.com
# Website: http://arsano.ninja
#
# Note: This code is a stop-gap to erase Job Artifacts for a project. I HIGHLY recommend you leverage
# "artifacts:expire_in" in your .gitlab-ci.yml
#
#!/usr/bin/python
# Credit to frogor for the objc
from Foundation import NSBundle
import json
import objc
import os
import plistlib
import subprocess
@codehustler
codehustler / nexusartifactremoverproject.py
Last active October 29, 2019 08:01
Atrifact removal script for Nexus
#Credits: The original author is Maarten Smeets
#this is a "fork" from his original script which can be found here: https://dl.dropboxusercontent.com/u/6693935/blog/NexusArtifactRemoverNetBeansProject.zip
#his blog article about this script can be found here: http://www.sonatype.org/nexus/2015/07/13/sonatype-nexus-delete-artifacts-based-on-a-selection/
import xml.etree.ElementTree as ET
import httplib
import datetime
import string
import base64
import getpass
@pbabics
pbabics / gitlab-gc.sh
Created November 11, 2016 13:13
Manual garbage collector for gitlab registry, it removes old revisions that are not referenced by any tag
#!/bin/bash
BASE_PATH=/var/opt/gitlab/gitlab-rails/shared/registry/docker/registry/v2/repositories
DRY_RUN=0
KEEP_LAST_IMAGES=10
RUN_GARBAGE_COLLECTOR=0
GITLAB_CTL_COMMAND=`which gitlab-ctl`
@lukechilds
lukechilds / get_latest_release.sh
Created August 9, 2016 19:43
Shell - Get latest release from GitHub
get_latest_release() {
curl --silent "https://api.github.com/repos/$1/releases/latest" | # Get latest release from GitHub api
grep '"tag_name":' | # Get tag line
sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value
}
# Usage
# $ get_latest_release "creationix/nvm"
# v0.31.4
@KenVanHoeylandt
KenVanHoeylandt / build.gradle
Last active November 7, 2024 20:06
Gradle auto-installing pre-commit hook
apply from: rootProject.file('gradle/install-git-hooks.gradle')
@abola
abola / nginx-install.sh
Last active February 2, 2021 20:03
Nginx install step with CentOS 6.7 min
#!/bin/sh
# required install
yum -y groupinstall 'Development Tools'
yum -y install wget patch git
yum -y install pcre-devel zlib-devel openssl-devel
# nginx download
wget http://nginx.org/download/nginx-1.8.1.tar.gz
tar zxvf nginx-1.8.1.tar.gz