Skip to content

Instantly share code, notes, and snippets.

View adnanirfan's full-sized avatar
🏓
while(true) eat(); sleep(); code();

Adnan Irfan adnanirfan

🏓
while(true) eat(); sleep(); code();
  • Geeks of Kolachi
  • Karachi
View GitHub Profile
@adnanirfan
adnanirfan / clear.txt
Created September 22, 2021 16:08 — forked from EQuimper/clear.txt
React-Native clear Watchman + Cache
watchman watch-del-all && rm -rf node_modules/ && yarn cache clean && yarn install && yarn start -- --reset-cache
@adnanirfan
adnanirfan / postgres-brew.md
Created July 27, 2021 11:38 — forked from ibraheem4/postgres-brew.md
Installing Postgres via Brew (OSX)

Installing Postgres via Brew

Pre-Reqs

Brew Package Manager

In your command-line run the following commands:

  1. brew doctor
  2. brew update
@adnanirfan
adnanirfan / nginx_cors_s3_upload_proxy_full
Created June 18, 2021 16:55 — forked from zefer/nginx_cors_s3_upload_proxy_full
My nginx config to allow CORS (cross-site) uploads to Amazon S3, with added config e.g. timeouts & security
# DO NOT RESPOND TO REQUESTS OTHER THAN yourdomain.com
server {
listen 80 default;
server_name _;
return 444;
}
# FILE UPLOADS
server {
listen 80;
@adnanirfan
adnanirfan / Interview Guide
Created November 29, 2019 22:29 — forked from nomanalikhan/Interview Guide
Interview Guide
- TechStacks/Language
- Javascript
- https://github.com/ganqqwerty/123-Essential-JavaScript-Interview-Questions
- https://www.toptal.com/javascript/10-most-common-javascript-mistakes
- https://www.toptal.com/javascript/interview-questions
- https://medium.com/javascript-in-plain-english/js-engine-and-optimization-dac1f7fcb87d
- https://www.freecodecamp.org/news/javascript-essentials-why-you-should-know-how-the-engine-works-c2cc0d321553/
- https://github.com/yangshun/front-end-interview-handbook
- lexical scoping
- React 16
@adnanirfan
adnanirfan / revert-a-commit.md
Created September 24, 2018 13:16 — forked from gunjanpatel/revert-a-commit.md
Git HowTo: revert a commit already pushed to a remote repository

Revert the full commit

Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.

git revert {commit_id}'

About History Rewriting

Delete the last commit

Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32: