Skip to content

Instantly share code, notes, and snippets.

View abhishekbhalani's full-sized avatar
🎄
working on latest framework...

Abhishek B. abhishekbhalani

🎄
working on latest framework...
View GitHub Profile
@akatakritos
akatakritos / create-aspnet-core-identity-schema.sql
Created June 5, 2018 03:19
Script to create the ASPNET core Identity tables
USE [HobbyDB]
GO
/****** Object: Table [dbo].[AspNetRoleClaims] Script Date: 6/4/2018 10:18:03 PM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[AspNetRoleClaims]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[AspNetRoleClaims](
@a-patel
a-patel / Stripe-Webhook-Controller.cs
Last active September 15, 2023 09:40
Stripe WebHooks handling in ASP.NET MVC (C#)
public class StripeController : Controller
{
/// <summary>
/// Stripe webhook handling
/// </summary>
/// <returns></returns>
[AllowAnonymous]
[HttpPost]
[Route("webhook")]
public IActionResult StripeWebhook()
@maravilhosinga
maravilhosinga / index.html
Created January 6, 2019 15:39
International Telephone Input - BOOTSTRAP INPUT GROUP
<h1>International Telephone Input - BOOTSTRAP INPUT GROUP</h1>
<form>
<div class="input-group">
<input type="tel" class="form-control">
<span class="input-group-addon">Tel</span>
</div>
<br>
<div class="input-group">
<input type="tel" class="form-control">
<span class="input-group-addon">Tel</span>
@cbdabner
cbdabner / DbMigrationTask.cs
Last active April 11, 2019 15:01
IStartupTask outside WebhostBuilder
public class DbMigrationTask<TDbContext> : IStartupTask
where TDbContext : DbContext
{
private readonly TDbContext _dbContext;
public DbMigrationTask(TDbContext dbContext)
{
_dbContext = dbContext;
}
@Prezens
Prezens / gist:f99fd28124b5557eb16816229391afee
Created April 2, 2019 07:40
Apache .htaccess settings for Vue, vue-router
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</IfModule>
https://router.vuejs.org/guide/essentials/history-mode.html#example-server-configurations
[AllowAnonymous]
[HttpPost]
public async Task<IHttpActionResult> Register ([FromBody] CreateUserCommand command) {
return Ok (await new CommandAsync (command));
}
PS D:\projects> choco install redis
Installing the following packages:
redis
By installing you accept licenses for the packages.
Progress: Downloading redis 2.4.6.1... 100%
redis v2.4.6.1 [Approved] - Possibly broken
redis package files install completed. Performing other installation steps.
Attempt to get headers for http://ruilopes.com/redis-setup/binaries/redis-2.4.6-setup-64-bit.exe failed.
The remote file either doesn't exist, is unauthorized, or is forbidden for url 'http://ruilopes.com/redis-setup/binaries/redis-2.4.6-setup-64-bit.exe'. Exception calling "GetResponse" with "0" argument(s): "The remote server returned an error: (404) Not Found."
@abhishekbhalani
abhishekbhalani / MasterClass.cs
Last active December 6, 2019 12:04
Current Calculation Logic
public class CalculationA
{
public string str1 {get;set;}
public string str2 {get;set;}
// 40 around properties
}
public class CalculationB{
public string str3 {get;set;}
public string str4 {get;set;}
rem Welcome to SmallBASIC
rem see https://github.com/anvaka/atree
nmax = 19
xScale = 6
zScale = 2.5
yScale = 16
startFrom = 0
dz = 400
redSpiralShadow = createSpiral(rgb(0x66,0,0), rgb(0x33,0,0), true, 1.01)

To customize the UI,

You can replace the current view with a new one. This is a customized account view: Create a file named Default.cshtml and put it in the folder Acme.BookStore\src\Acme.BookStore.Web\Themes\Lepton\Layouts\Account

@using System.Globalization
@using Microsoft.Extensions.Localization
@using Microsoft.Extensions.Options
@using Volo.Abp.AspNetCore.MultiTenancy