Skip to content

Instantly share code, notes, and snippets.

View ebicoglu's full-sized avatar
:octocat:
Full stack developer

Alper Ebiçoğlu ebicoglu

:octocat:
Full stack developer
View GitHub Profile
@ebicoglu
ebicoglu / AbpAspNetCoreMvcUiThemeCommercialModule.cs
Last active February 12, 2021 09:58
Volo.Abp.AspNetCore.Mvc.UI.Theme.Commercial Project
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared.Bundling;
using Volo.Abp.Modularity;
using Volo.Abp.VirtualFileSystem;
namespace Volo.Abp.AspNetCore.Mvc.UI.Theme.Commercial
{
[DependsOn(
@ebicoglu
ebicoglu / abp-docker.yaml
Last active April 14, 2021 09:16
ABP licensing in a Docker Container
#FROM mcr.microsoft.com/dotnet/sdk:5.0-focal
#ENV DOTNET_USE_POLLING_FILE_WATCHER 1
#WORKDIR /app/src/product-service/Volosoft.MyMicroserviceSystem.ProductService.HttpApi.Host
#RUN dotnet tool install -g dotnet-serve
#ENV PATH="${PATH}:/root/.dotnet/tools"
#RUN dotnet tool install --global Volo.Abp.Cli
#RUN abp login "user@sample.com" -p "12345"
#ENTRYPOINT [ "dotnet", "watch", "run", "--urls", "https://0.0.0.0:6001/" ]
@ebicoglu
ebicoglu / AppUser.cs
Created January 22, 2021 11:52
AppUser
public class AppUser : FullAuditedAggregateRoot<Guid>, IUser
{
#region Base properties
/* These properties are shared with the IdentityUser entity of the Identity module.
* Do not change these properties through this class. Instead, use Identity module
* services (like IdentityUserManager) to change them.
* So, this properties are designed as read only!
*/
@ebicoglu
ebicoglu / YourProject.Blazor_Dockerfile
Last active December 22, 2020 18:35
Containerize Blazor with Docker + nginx
FROM mcr.microsoft.com/dotnet/sdk:5.0-focal AS builder
WORKDIR /app
COPY . .
RUN dotnet publish -c Release src/YourProject.Blazor -o /app/publish
FROM nginx:alpine
COPY --from=builder /app/publish/wwwroot /usr/share/nginx/html/
@ebicoglu
ebicoglu / identity-server-config.md
Created December 22, 2020 18:20
Identity Server endpoints configuration for prod environment

These tables should be configured for prod environment. Also appsettings.json should be configured.

SELECT ClientId, PostLogoutRedirectUri FROM  IdentityServerClientPostLogoutRedirectUris

SELECT ClientId, RedirectUri FROM  IdentityServerClientRedirectUris

SELECT Id, ClientId, FrontChannelLogoutUri FROM  IdentityServerClients
@ebicoglu
ebicoglu / command-prompt.reg
Last active November 24, 2024 23:20
Useful developer Windows right click items (context menu)
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\Command Prompt *]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\Command Prompt *\command]
@="cmd.exe /s /k pushd \"%V\""

How to add a new language to your ABP project?

Adding a new language to your ABP project is pretty simple. Let's add the German language to our ABP project:

  1. Go to your solution's root folder and write the following CLI command. This command will generate an empty translation file from English.

abp translate -c de-DE

@ebicoglu
ebicoglu / manul-test-checklist.md
Last active September 13, 2020 21:55
Manual test checklist

ABP Manual Checklist

Create the template assigned to you. Visit all the pages, check the functionalities. Warning: For production testing, don't use preview parameter. Create issues for your feedbacks in the relevant repos (abp or volo).

To update your CLI tools, run the following commands:

dotnet tool update -g Volo.Abp.Cli
@ebicoglu
ebicoglu / sql-find-missing-index.sql
Created August 11, 2020 10:09
Finds missing indexes for SQL
SELECT
OBJECT_NAME(id.[object_id], db.[database_id]) AS [Table]
,id.[equality_columns] AS [EqualityColumns]
,id.[inequality_columns] AS [InEqualityColumns]
,id.[included_columns] AS [IncludedColumns]
,gs.[avg_total_user_cost] AS [UserCost] -- Average cost of the user queries that could be reduced by the index in the group.
,gs.[avg_user_impact] AS [QueryBoostImpact] -- The value means that the query cost would on average drop by this percentage if this missing index group was implemented.
,gs.[user_seeks] * gs.[avg_total_user_cost] * (gs.[avg_user_impact] * 0.01) AS [IndexAdvantage]
,'CREATE INDEX [IX_' + OBJECT_NAME(id.[object_id], db.[database_id]) + '_' + REPLACE(REPLACE(REPLACE(ISNULL(id.[equality_columns], ''), ', ', '_'), '[', ''), ']', '') + CASE
var abp = abp || {};
$(function () {
abp.modals.apiResourceUpdate = function () {
var initModal = function (publicApi, args) {
var l = abp.localization.getResource('AbpIdentityServer');
var $form = publicApi.getForm();
var getUniqueId = function () {