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 May 3, 2024 13:23
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
@carceneaux
carceneaux / remove_gitlab_artifacts.sh
Last active May 30, 2024 04:18
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 February 24, 2024 14:18
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
@eyecatchup
eyecatchup / win-ruby-ssl-error.md
Created July 29, 2015 02:26
SSL Error with Ruby on Windows when trying to install a gem from command line.

[Solved] The SSL_connect returned=1 errno=0 state=SSLv3 read server certificate-Error on Ruby for Windows

The Issue

When you try to install (or update) a Ruby gem from your Windows command line and get an error like, for example, the following:

> gem install compass
ERROR:  Could not find a valid gem 'compass' (>= 0), here is why:
        Unable to download data from https://rubygems.org/ - SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (https://rubygems.org/latest_specs.4.8.gz)