Skip to content

Instantly share code, notes, and snippets.

View yves-vogl's full-sized avatar

Yves Vogl yves-vogl

View GitHub Profile
@yves-vogl
yves-vogl / sp-w-cert-azps-1-0.ps1
Created October 25, 2023 12:34 — forked from devigned/sp-w-cert-azps-1-0.ps1
Create a service principal to auth with a certificate in Azure PowerShell 1.0
# Login to Azure PowerShell
Login-AzureRmAccount
# Create the self signed cert
$currentDate = Get-Date
$endDate = $currentDate.AddYears(1)
$notAfter = $endDate.AddYears(1)
$pwd = "P@ssW0rd1"
$thumb = (New-SelfSignedCertificate -CertStoreLocation cert:\localmachine\my -DnsName com.foo.bar -KeyExportPolicy Exportable -Provider "Microsoft Enhanced RSA and AES Cryptographic Provider" -NotAfter $notAfter).Thumbprint
$pwd = ConvertTo-SecureString -String $pwd -Force -AsPlainText
@yves-vogl
yves-vogl / 0 gc-step.md
Created May 5, 2023 12:48 — forked from sfwn/0 gc-step.md
docker registry cleanup script : just reserve most recently 5 images per repo

you need jq first.

Steps:

  1. download the script && chmod +x
  2. enable "delete" inside docker registry container
/etc/docker/registry/config.yml

storage:
 delete:
<app>
- iac
- bootstrap
- main-frontend
- main-backend
- main-shared
- src
- app-1
- app-2
- …
resource "azurerm_public_ip" "infra" {
name = "infra"
location = azurerm_resource_group.main.location
resource_group_name = azurerm_resource_group.main.name
allocation_method = "Static"
tags = var.tags
}
### Keybase proof
I hereby claim:
* I am yves-vogl on github.
* I am yvesvogl (https://keybase.io/yvesvogl) on keybase.
* I have a public key ASAQMRKw3b6Ork-DhL_oY8eN5KEx3jdaT0CBUy5WU3U6uQo
To claim this, I am signing this object:
@yves-vogl
yves-vogl / Dockerfile
Created August 20, 2018 19:21 — forked from anonoz/Dockerfile
Sample of multistage Dockerfile for Rails app in production
FROM madnight/docker-alpine-wkhtmltopdf as wkhtmltopdf_savior
# STAGE for bundle & yarn install
FROM ruby:2.4.3-alpine3.7 as builder
ENV CA_CERTS_PATH /etc/ssl/certs/
ENV RAILS_ENV production
ENV RAILS_LOG_TO_STDOUT true
ENV RAILS_SERVE_STATIC_FILES true
@yves-vogl
yves-vogl / ks.cfg
Created May 11, 2018 14:31 — forked from combatpoodle/ks.cfg
RHEL7 kickstart
# Base settings install
# Zero everything out...
zerombr
clearpart --all --initlabel
# Generic boot settings...
cdrom
lang en_US.UTF-8
keyboard 'us'