This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"os" | |
log "github.com/sirupsen/logrus" | |
) | |
func main() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"flag" | |
"fmt" | |
"log" | |
"os" | |
"github.com/mewkiz/flac" | |
"github.com/mewkiz/flac/meta" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
) | |
type file struct { | |
Size int `json:"size"` | |
Name string `json:"name"` | |
Extension string `json:"extension"` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# SETTINGS ----------------------- | |
IMAGE_BASE_DIR="/Users/guenther/Downloads/imagefiles" | |
SIZE_LIMIT="2M" # or "500k"? | |
RESIZE_PERCENTAGE="50" | |
# -------------------------------- | |
find ${IMAGE_BASE_DIR} -type f -size +${SIZE_LIMIT} | while read filepath; do | |
echo "Resizing $filepath ..." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"sync" | |
"time" | |
) | |
var messages chan string | |
var currentConditions string |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
commitLong=`git describe --always --abbrev=0` | |
echo "commitLong:" $commitLong | |
commitShort=`git describe --always` | |
echo "commitShort:" $commitShort | |
commitDatetime=`git log -1 --date=iso --format=%cd` | |
echo "commitDatetime:" $commitDatetime |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ViewController.swift | |
// RestApiCallExample | |
// | |
// Created by Günther Eberl on 16.08.19. | |
// Copyright © 2019 Günther Eberl. All rights reserved. | |
// | |
import UIKit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python | |
# -*- coding: utf-8 -*- | |
""" | |
Documentation: | |
- Docker Engine API: https://docs.docker.com/develop/sdk/ | |
- Docker SDK for Python: https://docker-py.readthedocs.io/en/stable/ | |
""" | |
from dateutil import parser |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python | |
# -*- coding: utf-8 -*- | |
import datetime | |
import json | |
import logging | |
import requests | |
from urllib import urlencode | |
from urllib2 import Request, urlopen | |
from tzlocal import get_localzone |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python3 | |
# -*- coding: utf-8 -*- | |
import requests | |
def get_token(auth_url, image_name): | |
payload = { | |
'service': 'registry.docker.io', | |
'scope': 'repository:library/{image}:pull'.format(image=image_name) |