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 / 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:

To Customize Notificaiotn in Ubuntu
http://ubuntuhandbook.org/index.php/2016/05/customizing-notification-bubbles-ubuntu-16-04/
@adnanirfan
adnanirfan / Nginx.md
Last active February 6, 2023 14:16
Nginx Setup
@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 / 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 / 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 / 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 / test.md
Last active December 17, 2022 08:19
Javascript Test - UIT Summer 2022
  1. Write a JavaScript function that reverse a number.

      Example x = 32243;
      Expected Output : 34223
    
  2. Write a JavaScript function that checks whether a passed string is palindrome or not?

      A palindrome is word, phrase, or sequence that reads the same backward as forward, e.g., madam or nurses run.
    
@adnanirfan
adnanirfan / Server Setup | Nginx | HTTPS SSL - Certbot | DOCKER | Free DNS - Resources.md
Last active August 18, 2023 19:15
Server Setup | Nginx | HTTPS SSL - Certbot | DOCKER | Free DNS - Resources