Skip to content

Instantly share code, notes, and snippets.

View dpr-dev's full-sized avatar
🏠
Working from home

Arthur Irgashev dpr-dev

🏠
Working from home
View GitHub Profile
@jonchen727
jonchen727 / gateway-namespace.yaml
Last active July 27, 2023 03:08
GKE Autopilot ASM and Ingress Gateway Manifests
apiVersion: v1
kind: Namespace
metadata:
name: asm-gateway
annotations:
mesh.cloud.google.com/proxy: '{"managed":"true"}'
labels:
istio.io/rev: asm-managed-rapid
@RealDotNetDave
RealDotNetDave / .editorConfig
Last active October 7, 2025 15:52
.editorConfig by David (dotNetDave) McCarter - dotNetTips.com
####################################################################################################
# dotNetDave's (David McCarter) Editor Config - dotNetTips.com
# Updates to this file are posted quarterly at: https://bit.ly/EditorConfig5
# Updated May 1, 2025
# Code performance book is available at: https://bit.ly/DotNetCodePerf4
# Coding standards book is available at: https://bit.ly/CodingStandards8
####################################################################################################
root = true
@davidfowl
davidfowl / Global.asax.cs
Last active August 12, 2025 17:53
ASP.NET MVC and ServiceCollection sample
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
using Microsoft.Extensions.DependencyInjection;
using WebApplication16;
using WebApplication16.Controllers;
@flut1
flut1 / unprotectAspNetIdentityCookie.js
Last active April 17, 2024 11:47
Unprotects a cookie in Node.JS that was encrypted using ASP.NET Core Identity with the default settings.
import { padStart } from 'lodash';
import leb128 from 'leb128';
import crypto from 'crypto';
// magic header used to identify an identity cookie
const MAGIC_HEADER = 0x09F0C9F0;
// key id size in bytes
const SIZE_KEY_ID = 16;
// size of key modifier according to the CbcAuthenticatedEncryptor:
// https://github.com/aspnet/DataProtection/blob/dev/src/Microsoft.AspNetCore.DataProtection/Cng/CbcAuthenticatedEncryptor.cs
@daominhsangvn
daominhsangvn / gist:f2d369ab4aafe9783e96fbe05285cfbd
Last active September 16, 2022 19:12
Push Notifications in React-Native with FireBase
  1. Add new App in Firebase Console, select iOS and follow exactly instruction. 1a. In the GoogleService-Info.plist step, after download the file, open xCode, in Project Navigator right click Supporting folder and select Add files to ... then select the downloaded file.
  2. Following this to create App Id, APNs (.p8) and Provisioning Profile for iOS: https://firebase.google.com/docs/cloud-messaging/ios/certs 2a. Add APN file (.p8) to Firebase App
  3. Edit Podfile, add following below pod 'Firebase/Core': pod 'Firebase/Messaging' then $ pod install again
  4. Install react-native-fcm module then rnpm link react-native-fcm
  5. Following this https://github.com/evollu/react-native-fcm#shared-steps and this https://github.com/evollu/react-native-fcm#xcode-post-installation-steps
  6. Write Component to handle Push Notifications:
# main.js
@MrAntix
MrAntix / Int.cs
Created April 23, 2017 18:45
Validating Number Input for a UWP XAML TextBox
namespace MyApp
{
public sealed class Int
{
public static readonly DependencyProperty AttachedProperty = DependencyProperty.RegisterAttached(
"IntAttached", typeof(bool), typeof(Int), null);
public static readonly DependencyProperty ValueProperty = DependencyProperty.RegisterAttached(
"Value", typeof(int), typeof(Int), new PropertyMetadata(null, OnAttach));
@angrycoffeemonster
angrycoffeemonster / Sublime Text 3 Build 3103 License Key - CRACK
Created April 18, 2016 02:13
Sublime Text 3 Build 3103 License Key - CRACK
I use the first
—– BEGIN LICENSE —–
Michael Barnes
Single User License
EA7E-821385
8A353C41 872A0D5C DF9B2950 AFF6F667
C458EA6D 8EA3C286 98D1D650 131A97AB
AA919AEC EF20E143 B361B1E7 4C8B7F04
@tennisonchan
tennisonchan / check_branch.sh
Last active August 3, 2022 04:19
Check if branch exists in #git
# if branch_name exists, it will return its hash
# if not, it will returns null
git rev-parse --verify --quiet branch_name
@lopspower
lopspower / README.md
Last active October 27, 2025 16:16
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

All hex value from 100% to 0% alpha:

@jaceklaskowski
jaceklaskowski / Rough Notes about CQRS and ES.md
Last active June 30, 2025 08:17
Rough Notes about CQRS and ES

Rough Notes about CQRS and ES

Once upon a time…

I once took notes (almost sentence by sentence with not much editing) about the architectural design concepts - Command and Query Responsibility Segregation (CQRS) and Event Sourcing (ES) - from a presentation of Greg Young and published it as a gist (with the times when a given sentence was heard).

I then found other summaries of the talk and the gist has since been growing up. See the revisions to know the changes and where they came from (aka the sources).

It seems inevitable to throw Domain Driven Design (DDD) in to the mix.