Skip to content

Instantly share code, notes, and snippets.

View amkherad's full-sized avatar

Ali Kherad amkherad

View GitHub Profile

How to follow this guide

The problem

I have one computer and two different github accounts. One is for work, the other is for my personal stuff. I can't use the same ssh key twice, so I have to use different ssh key for each of my accounts. How do I do that? How do I switch between these ssh keys?

@amkherad
amkherad / cloudSettings
Last active December 30, 2020 18:31
My VSCode Settings
{"lastUpload":"2020-12-30T18:31:29.865Z","extensionVersion":"v3.4.3"}
public class IranPostRemoteDet
{
private readonly IDataFormatters _dataFormatters;
private const string DetPlaceholder = @"
{ShCode}
{PharmacyMobile}
{RequestOrderId}
{StateId}
@amkherad
amkherad / DataContext.cs
Last active July 16, 2020 18:01
EntityFrameworkConfigurationsApplier
public class DataContext : DbContext {
private static readonly Lazy<Action<ModelBuilder>> EntityConfigurationApplier =
new Lazy<Action<ModelBuilder>>(
() => EntityConfigurationsApplier.CreateAutoApplierBuilder(typeof(DataContext))
);
protected override void OnModelCreating(
ModelBuilder modelBuilder
)
{
@amkherad
amkherad / git-pushing-multiple.rst
Created July 28, 2019 06:06 — forked from rvl/git-pushing-multiple.rst
How to push to multiple git remotes at once. Useful if you keep mirrors of your repo.

Pushing to Multiple Git Repos

If a project has to have multiple git repos (e.g. Bitbucket and Github) then it's better that they remain in sync.

Usually this would involve pushing each branch to each repo in turn, but actually Git allows pushing to multiple repos in one go.

If in doubt about what git is doing when you run these commands, just