Skip to content

Instantly share code, notes, and snippets.

View mhubig's full-sized avatar

Markus Hubig mhubig

View GitHub Profile
@mhubig
mhubig / main.go
Last active December 7, 2023 01:15
Solution for part 2 of day 6 of AOC-2023
package main
func calculateWinningStrategies(time, dist int) (strategies int) {
for i := 1; i <= time; i++ {
if (time-i)*i > dist {
strategies++
}
}
return strategies
}
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: datadog-agent
namespace: datadog-agent
labels:
app: datadog-agent
spec:
selector:
matchLabels:
ad_identifiers:
- tomcat
init_config:
## @param is_jmx - boolean - required
## Whether or not this file is a configuration for a JMX integration.
#
is_jmx: true
This file has been truncated, but you can view the full file.
2020-01-29 17:30:36 UTC | CORE | INFO | (pkg/tagger/tagger.go:152 in tryCollectors) | docker tag collector successfully started
2020-01-29 17:30:37 UTC | CORE | INFO | (pkg/util/kubernetes/kubelet/kubelet.go:771 in checkKubeletHTTPSConnection) | Successfully queried https://10.208.10.209:10250/ without any security settings, adding security transport settings to query https://10.208.10.209:10250/pods
2020-01-29 17:30:37 UTC | CORE | INFO | (pkg/util/kubernetes/kubelet/kubelet.go:775 in checkKubeletHTTPSConnection) | Successfully connected securely to kubelet endpoint https://10.208.10.209:10250/pods
2020-01-29 17:30:37 UTC | CORE | INFO | (pkg/util/kubernetes/kubelet/kubelet.go:778 in checkKubeletHTTPSConnection) | Successfully authorized to query the kubelet on https://10.208.10.209:10250/pods: 200, using https://10.208.10.209:10250 as kubelet endpoint
2020-01-29 17:30:37 UTC | CORE | INFO | (pkg/util/kubernetes/kubelet/kubelet.go:686 in setKubeletHost) | Connection to the kubelet succeeded! 10.208.10.209 is
Wed Jul 11 14:38:35 UTC 2018
@mhubig
mhubig / kraken.fish
Last active March 22, 2018 17:13 — forked from BBlackwo/kraken.fish
Open GitKraken from the terminal
## Forked from https://gist.github.com/dersam/0ec781e8fe552521945671870344147b
## Also received help from https://twitter.com/gitkraken/status/691675309725368321
## Iterated upon https://gist.github.com/BBlackwo/b4fec2c0e6d1c6ade21fcbc1511255eb
## Open GitKraken using the current repo directory.
## Note: This code is for fish shell on macOS.
function kraken
set dir $argv[1] (pwd) # use a directory if you pass it in, otherwise pwd
open -a GitKraken --args --path $dir
def create(self, validated_data):
# get the sections data
sections = validated_data.pop('sections', [])
user = self.context['request'].user
# Create the chapter instance
chapter = Chapter.objects.create(**validated_data)
# Create each section instance
@mhubig
mhubig / ifpvis-logger.py
Last active March 31, 2017 08:51
Pseudocode Draft of an IFPVIS Logger application ...
#!/usr/bin/env python2
# -*- coding: UTF-8 -*-
import time
import implib2
import bravado
LOGGER_ID = 'LG001'
# Initialize the IFPVIS API Client
@mhubig
mhubig / Dockerfile
Created March 30, 2017 14:03
Dockerfile for Partkeepr (WIP)
FROM php:7-apache
MAINTAINER Markus Hubig <mh@imko.de>
ENV VERSION 1.2.0
# defaults, overwrite on startup to customize
ENV PARTKEEPR_DATABASE_HOST database
ENV PARTKEEPR_DATABASE_NAME partkeepr
ENV PARTKEEPR_DATABASE_PORT 3306
ENV PARTKEEPR_DATABASE_USER partkeepr
@mhubig
mhubig / Dockerfile
Last active November 3, 2023 03:42
Alpine Linux based cronjob runner
FROM alpine:latest
RUN apk add --update php python py-pip mysql-client \
&& pip install awscli \
&& rm -rf /var/cache/apk/*
RUN touch crontab.tmp \
&& echo '* */6 * * * /usr/bin/php /var/www/partkeepr/app/console partkeepr:cron:run' > crontab.tmp \
&& echo '0 2 * * * /usr/bin/sql_backup' >> crontab.tmp \
&& crontab crontab.tmp \