Skip to content

Instantly share code, notes, and snippets.

View mehmetcantas's full-sized avatar
🎯
Focusing

Mehmet Can Taş mehmetcantas

🎯
Focusing
View GitHub Profile
import "github.com/charmbracelet/bubbles/key"
type KeyMap struct {
Up key.Binding
Down key.Binding
TogglePreview key.Binding
OpenGithub key.Binding
Refresh key.Binding
PageDown key.Binding
PageUp key.Binding
# You need create a project access token "Repository -> Settings -> Access Token"
# When you create access token you need to add to the CI/CD variables "Repository -> Settings -> CI/CD -> Expand Variables Section"
# Click to add variable button and set variable name as GITLAB_CI_PUSH_TOKEN then copy your access token value
# Well done after these steps copy and paste following instructions to your .gitlab-ci.yaml file
Merge master into hotfix:
stage: merge-master-to-hotfix
needs: ["StageName"]
before_script:
- apk update && apk add git
FROM golang:1.16-alpine as builder
ARG CGO_ENABLED=0
RUN apk add --no-cache upx
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
@charset "UTF-8";
.swagger-ui html {
box-sizing: border-box
}
body {
background-color: #2c3e50
}
.swagger-ui *, .swagger-ui :after, .swagger-ui :before {
@mehmetcantas
mehmetcantas / .yml
Created June 20, 2020 18:46
Sample Dev Docker Compose File
version: "3.7"
services:
docker_api:
environment:
- CONNECTION_STRING=Server=222.333.4.5;Database=DevelopmentDatabase;User Id=sa;Password=dev-12345;MultipleActiveResultSets=True
- JWT_SECRET=development-jwt-secret
version: "3.7"
services:
docker_api:
build:
context: .
dockerfile: Dockerfile
environment:
- CONNECTION_STRING=Server=192.168.0.2;Database=ProductionDatabase;User Id=sa;Password=12345;MultipleActiveResultSets=True
- JWT_SECRET=sample-jwt-secret
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1-buster-slim AS base
WORKDIR /app
EXPOSE 80
FROM mcr.microsoft.com/dotnet/core/sdk:3.1-buster AS build
WORKDIR /src
COPY . .
WORKDIR "./src/Sample.Api"
USE master
go
SELECT sdes.database_id
,sdes.[host_name]
,sdes.[program_name]
,sdes.login_name
,sdes.login_time
,sdec.client_net_address
,sdec.local_net_address
,sdest.Query
using System;
using App.Metrics;
using App.Metrics.AspNetCore;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Hosting;
namespace MediumGrafanaArticleExample
{
public class Program
{
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
namespace MediumGrafanaArticleExample
{
public class Startup