Skip to content

Instantly share code, notes, and snippets.

View amrElroumy's full-sized avatar

Amr Elroumy amrElroumy

View GitHub Profile
@amrElroumy
amrElroumy / system_design_numbers_cheat_sheet.md
Created April 13, 2021 18:05 — forked from mwakaba2/system_design_numbers_cheat_sheet.md
Updated easy to remember system design numbers for back-of-the-envelope calculations

Updated, easy to remember numbers for back-of-the-envelope calculations in system design interviews

Powers of two table

Power    Approx Value (Bytes)       Bytes
-----------------------------------------
10                 1 thousand        1 KB
16                16 thousand       64 KB
20                  1 million        1 MB
30 1 billion 1 GB
@amrElroumy
amrElroumy / postgraphiql.ts
Created March 8, 2021 08:13 — forked from xvaara/postgraphiql.ts
Dark mode for PostgraphiQL
const graphiqlBrandingTweak = {
["postgraphile:graphiql:html"](html: string) {
console.log("Applying GraphiQL Branding Tweak...");
return html.replace(
"</head>",
`<style type="text/css">
@media (prefers-color-scheme: dark) {
html {
filter: invert(1) hue-rotate(180deg);
}

Problem

I have two Github accounts: oanhnn (personal) and superman (for work). I want to use both accounts on same computer (without typing password everytime, when doing git push or pull).

Solution

Use ssh keys and define host aliases in ssh config file (each alias for an account).

How to?

  1. Generate ssh key pairs for accounts and add them to GitHub accounts.
@amrElroumy
amrElroumy / multiple_ssh_setting.md
Created January 18, 2021 22:17 — forked from jexchan/multiple_ssh_setting.md
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@amrElroumy
amrElroumy / PowerShell Customization.md
Created May 20, 2020 20:17 — forked from jchandra74/PowerShell Customization.md
PowerShell, Cmder / ConEmu, Posh-Git, Oh-My-Posh, Powerline Customization

Pimping Up Your PowerShell & Cmder with Posh-Git, Oh-My-Posh, & Powerline Fonts

Backstory (TLDR)

I work as a full-stack developer at work. We are a Windows & Azure shop, so we are using Windows as our development platform, hence this customization.

For my console needs, I am using Cmder which is based on ConEmu with PowerShell as my shell of choice.

Yes, yes, I know nowadays you can use the Linux subsystem on Windows 10 which allow you to run Ubuntu on Windows. If you are looking for customization of the Ubuntu bash shell, check out this article by Scott Hanselman.

@amrElroumy
amrElroumy / History\-17eceb71\entries.json
Last active May 21, 2023 04:34
Visual Studio Code Settings Sync Gist
{"version":1,"resource":"file:///d%3A/Programming/browser_automation/cypress.config.js","entries":[{"id":"BOJy.js","timestamp":1656185935826}]}
@amrElroumy
amrElroumy / 0_reuse_code.js
Created January 7, 2014 13:37
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console