Skip to content

Instantly share code, notes, and snippets.

View kpratik2015's full-sized avatar
🐌
Slow and Steady

Pratik Kataria kpratik2015

🐌
Slow and Steady
View GitHub Profile
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@kpratik2015
kpratik2015 / gitlab-push-with-ssh-key.md
Created April 28, 2021 17:58
Making Gitlab SSH key work

In ~/.ssh, create a config file with contents as follows:

User git
Hostname gitlab.com
IdentityFile ~/.ssh/gitlab
TCPKeepAlive yes
IdentitiesOnly yes
@kpratik2015
kpratik2015 / typescript-tip-1.ts
Created February 20, 2021 10:43
Powerful alternative to enum in typescript
/*
{
readonly INPUT_CHANGE: "INPUT_CHANGE";
readonly ERROR: "ERROR";
readonly DELETE_ERROR: "DELETE_ERROR";
}
*/
const FormReducerTypes = {
INPUT_CHANGE: "INPUT_CHANGE",
@kpratik2015
kpratik2015 / remove-file-folder-accidentally-committed.md
Created January 19, 2021 14:04
Remove file/folder accidentally committed

Ref

git rm -r --cached .idea/

Then git commit and push

@kpratik2015
kpratik2015 / apollo-client-updated.ts
Created October 10, 2020 20:39
Updated Apollo Client with v3 apollo and cross-fetch
import {
ApolloClient,
InMemoryCache,
HttpLink,
ApolloLink,
from,
} from "@apollo/client";
import fetch from "cross-fetch";
import { setContext } from "@apollo/client/link/context";
@kpratik2015
kpratik2015 / boxShadow
Created June 9, 2019 15:36
Subtle box shadows
box-shadow: rgba(0, 0, 0, 0.1) 0px 3px 12px 0px;