Skip to content

Instantly share code, notes, and snippets.

Avatar

Ali alikrc

View GitHub Profile
View deleteGithubRepoScript.py
import requests
# create your token with delete_repo scope
# https://github.com/settings/tokens/new
token = ""
userName = "alikrc"
repoName = ""
View codilityChallenge.cs
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 Jan 31, 2021
Domain Driven Design DDD microservice example
View DDD.md

Theory:

image

Example:

image

@alikrc
alikrc / identity server ef migration commands.ps1
Last active Jan 30, 2021
identity server ef migration commands
View identity server ef migration commands.ps1
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 Dec 27, 2020
python script for pulling and saving your vault data to a json file. Also saves vault items ordered by rating
View ue4marketplaceVaultPuller.py
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 Sep 14, 2020
Basic Object Spawner for unity editor
View BasicObjectSpawner.cs
using UnityEngine;
using UnityEditor;
using System;
public class BasicObjectSpawner : EditorWindow
{
string objectBaseName;
int objectId;
GameObject objectToSpawn;
float objectScale;
@alikrc
alikrc / newInputSystemWithSendMessagesBehaviour.cs
Last active Sep 13, 2020
New input system unity with send messages behaviour. Set a projectile prefab before running
View newInputSystemWithSendMessagesBehaviour.cs
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;
View Unity Change Package Appdata Location.txt
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 Aug 11, 2020 — 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.
View README.md

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

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