Skip to content

Instantly share code, notes, and snippets.

View philippdrebes's full-sized avatar

Philipp Drebes philippdrebes

  • Zug, Switzerland
  • 02:55 (UTC +02:00)
View GitHub Profile
@philippdrebes
philippdrebes / acr_cleanup.sh
Created April 26, 2021 11:52
Script for cleaning up development tags from Azure Container Registry. Images are untagged so that the manifests will get deleted according to the configured retention policy.
#!/bin/bash
registry_name=my-registry
hundred_days_ago=$(date -d 'now - 100 days' +%s)
for repo in $(az acr repository list --name $registry_name | jq -r '.[]')
do
echo '-----------------------------------------------------------------'
echo $repo
echo '-----------------------------------------------------------------'
@philippdrebes
philippdrebes / download_progress.go
Created March 20, 2018 19:45
download progress in go
// PassThru wraps an existing io.Reader.
//
// It simply forwards the Read() call, while displaying
// the results from individual calls to it.
type PassThru struct {
io.Reader
total int64 // Total # of bytes transferred
length int64 // Expected length
progress float64
}
@philippdrebes
philippdrebes / Castle.xml
Last active September 18, 2017 16:33 — forked from kwmt/Castle.xml
<?xml version="1.0" encoding="UTF-8" ?>
<Data>
<Series>
<id>83462</id>
<Actors>|Nathan Fillion|Stana Katic|Molly C. Quinn|Jon Huertas|Seamus Dever|Tamala Jones|Susan Sullivan|Ruben Santiago-Hudson|Monet Mazur|</Actors>
<Airs_DayOfWeek>Monday</Airs_DayOfWeek>
<Airs_Time>10:00 PM</Airs_Time>
<ContentRating>TV-PG</ContentRating>
<FirstAired>2009-03-09</FirstAired>
<Genre>|Drama|</Genre>
@philippdrebes
philippdrebes / Gulpfile.js
Created January 13, 2017 14:03
Basic Gulp setup
var gulp = require('gulp'),
sass = require('gulp-sass'),
autoprefixer = require('gulp-autoprefixer'),
jshint = require('gulp-jshint'),
uglify = require('gulp-uglify'),
imagemin = require('gulp-imagemin'),
rename = require('gulp-rename'),
concat = require('gulp-concat'),
notify = require('gulp-notify'),
cache = require('gulp-cache'),