Skip to content

Instantly share code, notes, and snippets.

View cinkagan's full-sized avatar
😎
Just do it

S. Kağan Cin cinkagan

😎
Just do it
View GitHub Profile
@cinkagan
cinkagan / gist:d02e4e28f472ad8928e3de48b7924f25
Created March 20, 2020 19:47
Php + MySql+ Phpmyadmin docker-compose
version: '3'
services:
web:
build: ./web
container_name: projePhp
depends_on:
- database
volumes:
- ./web:/var/www/html/
System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance); // Türkçe karakter sorunu yaşamamak için gerekli
using (var stream = new StreamReader(file.OpenReadStream()))
{
using (var reader = ExcelReaderFactory.CreateReader(stream.BaseStream))
{
while (reader.Read())
{
// İşlemler
var deger=reader.GetValue(1).ToString(); // 1 sayısını verisini almak istediğiniz kolon numarası ile değiştirin
}
@cinkagan
cinkagan / Dockerfile
Last active January 11, 2021 23:42
Asp.Net Core Development Dockerfile
FROM mcr.microsoft.com/dotnet/core/sdk:3.1
ENV DOTNET_USE_POLLING_FILE_WATCHER 1
WORKDIR /app
COPY . .
ENV ASPNETCORE_URLS http://+:5005
EXPOSE 5005
ENTRYPOINT dotnet watch --project Test.WebAPI/Test.WebAPI.csproj run --urls=http://+:5005 // Watch kullanarak herhangi bir değişiklikte otomatik ayağa kalkmasını sağlıyoruz.
@cinkagan
cinkagan / XSS.php
Created January 11, 2021 23:41
Laravel Query String Xss Security Middleware
<?php
namespace App\Http\Middleware;
use Illuminate\Support\Facades\Redirect;
use Closure;
class XSS
{
/**
@cinkagan
cinkagan / webpack.config.js
Created September 7, 2022 21:59
Monorepo React Native + ReactJs Storybook
const path = require("path");
module.exports = {
entry: "./src/index.tsx",
output: {
path: path.resolve(__dirname, "build"),
publicPath: "/",
filename: "bundle.js",
},
devServer: {
@cinkagan
cinkagan / main.js
Created September 7, 2022 22:05
React-Native + React JS StoryBook
const custom = require("../webpack.config.js");
module.exports = {
stories: ["../src/**/*.stories.tsx"],
addons: [
"@storybook/addon-links",
"@storybook/addon-essentials",
"@storybook/addon-interactions",
"@storybook/preset-create-react-app",
],
@cinkagan
cinkagan / Button.stories.tsx
Created September 7, 2022 22:11
React Native Storybook
import React from "react";
import { ComponentMeta } from "@storybook/react";
import Button from "shared-components/Button"; //React Native Component
export default {
title: "Button",
component: Button,
} as ComponentMeta<typeof Button>;
export const Default = (args: any) => <Button {...args} />;