Skip to content

Instantly share code, notes, and snippets.

View abdurrahman's full-sized avatar
🃏

Abdurrahman Işık abdurrahman

🃏
View GitHub Profile
@abdurrahman
abdurrahman / Dockerfile
Created November 30, 2022 10:55
How to install tool internally with non-root user Dockerfile
FROM mcr.microsoft.com/dotnet/sdk:6.0.300-bullseye-slim
ENV EF_VERSION=7.0.0
ENV user dotnetuser
ENV PATH=/opt/bin:${PATH}
RUN dotnet tool install dotnet-ef --tool-path /opt/bin --version ${EF_VERSION}
WORKDIR /src
@abdurrahman
abdurrahman / time_savior_git_commands.md
Last active October 12, 2020 14:52
Time savior git commands.

How to undo latest commmit back

git reset --soft HEAD~1

It undoes the most recent commit whilst keeping the changes made in that commit to staging.

Merge development into master

git checkout master 
git merge development
@abdurrahman
abdurrahman / TimerHelper.cs
Created August 16, 2019 12:12
Managing multiple Timer instances
using System;
namespace Core.Interfaces
{
/// <summary>
/// An helper to manage generated events after a set interval, due time
/// with an option to generate recurring events.
/// </summary>
public interface ITimerHelper
{
@abdurrahman
abdurrahman / SQL_Helpful_Scripts.md
Last active February 1, 2021 15:41
Some useful tips and tricks in SQL

Duplicate a database within same SQL server

Firstly, backup your exist database which you want to copy with.

backup database <ExistDatabaseName>
to disk='D:\MSSQL\Backup\ExistDatabaseName.bak';

Then after you should check exist database's logical file names before restore.

RESTORE FILELISTONLY   
@abdurrahman
abdurrahman / csharp_style_guide.md
Last active August 6, 2018 22:09
A C# Style Guide

We can follow this document for CSharp coding standards.

Additionally our default editorconfig file must be update with below settings.

[*.cs]
indent_size = 4
end_of_line = crlf