Skip to content

Instantly share code, notes, and snippets.

View berkayakcay's full-sized avatar
🍀
Knockin’ On Heaven’s Door

Berkay Akçay berkayakcay

🍀
Knockin’ On Heaven’s Door
View GitHub Profile
@berkayakcay
berkayakcay / Dockerfile
Created July 22, 2020 12:46
Install WKHTMLTOPDF on ASPNET Image
FROM mcr.microsoft.com/dotnet/core/aspnet:3.1.4-buster-slim
# # # # # # # # # # # # # # # # # # # # # # #
# INSTALL WKHTMLTOPDF
ENV WKHTMLTOX wkhtmltox_0.12.5-1.buster_amd64.deb
ENV BUILD_PACKAGES build-essential
ENV MAIN_PACKAGES fontconfig libfreetype6 libjpeg62-turbo libxext6 libpng16-16 libx11-6 libxcb1 libxrender1 xfonts-75dpi xfonts-base
COPY deps/$WKHTMLTOX /
@berkayakcay
berkayakcay / Dockerfile
Created July 6, 2020 14:51
dotnet runtime 3.1.4 buster-slim with SUPERVISORD, WKHTMLTOPDF
FROM mcr.microsoft.com/dotnet/core/runtime:3.1.4-buster-slim
# # # # # # # # # # # # # # # # # # # # # # #
# INSTALL SUPERVISORD
RUN set -xe && \
apt-get update && apt-get install -y --no-install-recommends \
supervisor && \
apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
@berkayakcay
berkayakcay / .Dockerfile
Last active July 3, 2020 15:09
dotnet uygulaması için build cache optimizasyonu örnek dockerfile #dotnet #DockerFile DockerBuildCache
FROM mcr.microsoft.com/dotnet/core/sdk:3.1.300-buster AS build
WORKDIR /src
# Docker build cache'inden yararlanarak hızlandırıyoruz.
COPY "eShopOnContainers-ServicesAndWebApps.sln" "eShopOnContainers-ServicesAndWebApps.sln"
COPY "Services/Basket/Basket.API/Basket.API.csproj" "Services/Basket/Basket.API/Basket.API.csproj"
COPY "Services/Catalog/Catalog.API/Catalog.API.csproj" "Services/Catalog/Catalog.API/Catalog.API.csproj"
COPY "Services/Identity/Identity.API/Identity.API.csproj" "Services/Identity/Identity.API/Identity.API.csproj"
COPY "Services/Location/Locations.API/Locations.API.csproj" "Services/Location/Locations.API/Locations.API.csproj"
@berkayakcay
berkayakcay / supervisor-kill-container.py
Created June 5, 2019 11:51
Kill all process in supervisord
#!/usr/bin/env python
import sys
import os
import signal
def write_stdout(s):
sys.stdout.write(s)
sys.stdout.flush()
def write_stderr(s):
sys.stderr.write(s)
@berkayakcay
berkayakcay / laplacian-algorithm.m
Created May 27, 2019 10:36
Image Processing MATLAB Laplacian Algorithm
clc; clear; close all;
I= imread('chessboard.jpg');
I = rgb2gray(I);
[R,C] = size(I);
SI = uint8(zeros(R,C));
mask = 1;
% kernel = [-1,-1,-1;-1,8,-1;-1,-1,-1];
% kernel = [1,1,1;1,-8,1;1,1,1];
@berkayakcay
berkayakcay / matlab-median-algorithm.m
Created May 13, 2019 17:46
Image Processing MATLAB Median Algoritması
clc; clear; close all;
I= imread('p.jpg');
I = rgb2gray(I);
[R,C] = size(I);
SI = uint8(zeros(R,C));
for r=1:R
for c=1:C
ListOfValues = 1:9;
counter = 0;
for i=-1:1
@berkayakcay
berkayakcay / matlab-mean-algorithm.m
Last active May 13, 2019 17:45
Image Processing MATLAB Mean Algoritması
clc; clear; close all;
I= imread('p.jpg');
I = rgb2gray(I);
[R,C] = size(I);
SI = uint8(zeros(R,C));
for r=1:R
for c=1:C
total = 0.0;
counter = 0;
for i=-1:1
@berkayakcay
berkayakcay / cpp-pyramid.cpp
Created May 1, 2019 12:28
C++'da Piramit Çizimi
#include
using namespace std;
class Piramit
{
public:
Piramit();
void ciz();
void piramitGir();
int satirSayisi;
char karakter;
@berkayakcay
berkayakcay / cpp-square.cpp
Last active May 1, 2019 12:24
C++’da Dörtgen Çizimi
#include
#include
#include
using namespace std;
class Dortgen
{
public:
Dortgen();
void ciz();
void solaGit();
@berkayakcay
berkayakcay / cpp-factorial.cpp
Created May 1, 2019 12:17
C++'da Faktöriyel Hesaplama
#include
#include
using namespace std;
unsigned long faktoriyelHesapla(unsigned long);
int main()
{
int sayi;
unsigned long faktoriyel;
cout << “Sayi Giriniz “; cin >> sayi;
faktoriyel = faktoriyelHesapla(sayi);