Skip to content

Instantly share code, notes, and snippets.

View selcukusta's full-sized avatar

Selçuk Usta selcukusta

View GitHub Profile
type NetCoreConfigManagementSpec struct {
LinkedDeployments []string `json:"linkedDeployments,required"`
Config struct {
ConfigMapName string `json:"configMapName,required"`
ConfigMapKey string `json:"configMapKey,required"`
ConfigMapValue string `json:"configMapValue,required"`
} `json:"config"`
}
apiVersion: selcukusta.com/v1alpha1
kind: NetCoreConfigManagement
metadata:
name: example-netcoreconfigmanagement
spec:
linkedDeployments:
- sampleapp-dep
config:
configMapName: sampleconfig
configMapKey: appsettings.Kubernetes.json
@selcukusta
selcukusta / Dockerfile
Last active June 11, 2023 08:01
Using MS font family in Debian 9 based ASP.NET Core Docker images
FROM mcr.microsoft.com/dotnet/core/aspnet:2.2-stretch-slim as runtime
RUN apt-get update && \
apt-get install -y wget \
fontconfig && \
wget http://ftp.br.debian.org/debian/pool/contrib/m/msttcorefonts/ttf-mscorefonts-installer_3.6_all.deb && \
apt --fix-broken install -y ./ttf-mscorefonts-installer_3.6_all.deb && \
rm ttf-mscorefonts-installer_3.6_all.deb && \
fc-cache -f -v
apiVersion: networking.istio.io/v1alpha3
kind: EnvoyFilter
metadata:
name: cache-control-header-envoy-filter
spec:
workloadLabels:
app: app-name
filters:
- listenerMatch:
portNumber: 80
filter {
mutate {
# Mesaj icerisinde gecen mail adreslerini maskeler. Ornegin; "Giris yapan kullanici: system@domain.com -> Giris yapan kullanici: s***m@domain.com"
gsub => [
"Message", "([a-zA-Z0-9_.+-])[a-zA-Z0-9_.+-]+([a-zA-Z0-9_.+-])(@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+)", "\1***\2\3"
]
}
}
az group create \
--name "[CLUSTER_RESOURCE_GROUP_NAME]" \
--location "[CLUSTER_RESOURCE_GROUP_LOCATION]"
az aks create \
--name "[CLUSTER_NAME]" \
--resource-group "[CLUSTER_RESOURCE_GROUP_NAME]" \
--dns-name-prefix "[CLUSTTER_DNS_PREFIX]" \
--kubernetes-version "1.12.7" \
--location "[CLUSTER_LOCATION]" \

Bu yazı, adresinde yer alan yazının Türkçe'ye çevrilmiş ve bazı küçük eklemeler yapılmış halidir.

Adım Adım RESTful API Tasarımı

Yazılım geliştiriciler olarak, hayatımızın hemen hemen her günü REST API’ler geliştiriyor ya da kullanıyoruz. API’nin en genel anlamı, sistemlerin birbirleriyle haberleşebilmesidir. Amazon, API’lerin iletişim için efektif şekilde kullanılması konusunda en iyi örnektir.

Bu makale boyunca, sıklıkla yapılan hatalardan kaçınarak nasıl daha iyi RESTful API’ler tasarlanabileceği hakkında konuşacağız.

Jeff Bezos’un “Başarının Anahtarı” Talimatı

param (
[string]$resourceGroupName = "bootcamp-rg",
[string]$trafficManagerProfile = "bootcamp-traffic-manager",
[string]$tagName = "multi-instance"
)
$servicePrincipalConnection = Get-AutomationConnection -Name "AzureRunAsConnection"
Connect-AzAccount `
-ServicePrincipal `
-TenantId $servicePrincipalConnection.TenantId `
-ApplicationId $servicePrincipalConnection.ApplicationId `
<target name="logstash" xsi:type="Network" address="tcp://logstash.url:8080" newLine="true">
<layout xsi:type="JsonLayout" includeAllProperties="false">
<attribute name="@timestamp" layout="${date:universalTime=true:format=yyyy-MM-ddTHH\:mm\:ss.fffZ}" />
<attribute name="ApplicationName" layout="${iis-site-name:upperCase=true}" />
<attribute name="Logger" layout="${logger}" />
<attribute name="MethodName" layout="${callsite}" />
<attribute name="LogLineNumber" layout="${callsite-linenumber}" />
<attribute name="Date" layout="${date:universalTime=true:format=o}" />
<attribute name="Exception" layout="${exception:maxInnerExceptionLevel=3:format=ToString}" />
<attribute name="CallStack" layout="${stacktrace:format=Raw}" />
using System;
using System.Net.Http;
using System.Threading;
using System.Threading.Tasks;
/* packages.config */
/*
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="HtmlAgilityPack" version="1.8.11" targetFramework="net472" />