Skip to content

Instantly share code, notes, and snippets.

View alikrc's full-sized avatar

Ali alikrc

View GitHub Profile
import requests
# create your token with delete_repo scope
# https://github.com/settings/tokens/new
token = ""
userName = "alikrc"
repoName = ""
using System;
using System.Collections.Generic;
class Solution
{
public int solution(int[] A)
{
var numberOfVariations = 0;
var alreadyCut = false;
@alikrc
alikrc / DDD.md
Last active January 31, 2021 15:30
Domain Driven Design DDD microservice example

Theory:

image

Example:

image

@alikrc
alikrc / identity server ef migration commands.ps1
Last active January 30, 2021 20:02
identity server ef migration commands
dotnet ef migrations add InitialIdentityServerPersistedGrantDbMigration -c PersistedGrantDbContext -o Data/Migrations/IdentityServer/PersistedGrantDb
dotnet ef migrations add InitialIdentityServerConfigurationDbMigration -c ConfigurationDbContext -o Data/Migrations/IdentityServer/ConfigurationDb
dotnet ef migrations add InitialIdentityServerApplicationDbMigration -c ApplicationDbContext -o Data/Migrations/IdentityServer/ApplicationDb
//reference
@alikrc
alikrc / ue4marketplaceVaultPuller.py
Created December 27, 2020 18:51
python script for pulling and saving your vault data to a json file. Also saves vault items ordered by rating
import requests
import json
import math
elementsList = []
itemPerPage = 100
epicClientSessionCookieValue = 'EPIC_CLIENT_SESSION_COOKIE_HERE'
epicSSOCookieValue = "EPIC_SSO_COOKIE_HERE"
@alikrc
alikrc / BasicObjectSpawner.cs
Last active May 31, 2022 00:20
Basic Object Spawner for unity editor
using UnityEngine;
using UnityEditor;
using System;
public class BasicObjectSpawner : EditorWindow
{
string objectBaseName;
int objectId;
GameObject objectToSpawn;
float objectScale;
@alikrc
alikrc / newInputSystemWithSendMessagesBehaviour.cs
Last active September 13, 2020 19:09
New input system unity with send messages behaviour. Set a projectile prefab before running
using System;
using UnityEngine;
using UnityEngine.InputSystem;
public class PlayerController : MonoBehaviour
{
public float speed = 10.0f;
public GameObject projectilePrefab;
private InputAction moveAction;
private InputAction fireAction;
mklink /J "%appdata%\Unity" "A:\UnityAssetStoreCache"
https://www.howtogeek.com/howto/16226/complete-guide-to-symbolic-links-symlinks-on-windows-or-linux/
@alikrc
alikrc / README.md
Created August 11, 2020 12:36 — forked from jgoodall/README.md
This is a sample of how to send some information to logstash via the TCP input from node.js or python.

This is a sample of how to send some information to logstash via the TCP input in nodejs or python. It assumes the logstash host is on 10.10.10.100 and the TCP listening input is 9563.

The logstash.conf should look something like the sample file.

The log message should be a stringified JSON object with the log message in the @message field.

To use, run the node script node sendMessageToLogstash.js, or the python script python sendMessageToLogstash.js

d:
Set-Location D:\MyProjectFolder
Get-ChildItem .\ -include bin,obj -Recurse | ForEach-Object ($_) { Remove-Item $_.FullName -Force -Recurse }