Skip to content

Instantly share code, notes, and snippets.

View amitmerchant1990's full-sized avatar

Amit Merchant amitmerchant1990

View GitHub Profile
<html>
<head>
<title>Notepad - Offline capable</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#9b59b6">
<meta name="description" content="An offline capable notepad powered by ServiceWorker">
<meta name="keywords" content="note,offline,mobile,web,notepad" />
<meta name="author" content="Amit Merchant">
<meta name="application-name" content="Notepad" />
@amitmerchant1990
amitmerchant1990 / github_code_previewer_dark_skin.css
Created November 9, 2016 12:29
GitHub Code Previewer Dark Skin
/**
A nifty little CSS to experience GitHub code previewer in Dark Skin using Stylish.
1. Install the Stylish(https://chrome.google.com/webstore/detail/stylish/fjnbnpbmkenffdnngjfgmeleoegfcffe?hl=en) extension for Chrome.
2. Open up extension options and paste the whole CSS mentioned below.
3. Add "URLs on the domian to" to be `render.githubusercontent.com`.
4 Add "URLs on the domian to" to be `raw.githubusercontent.com`.
4 Add "URLs matching the regexp" to be `^https?://((gist|guides|help|raw|status|developer).)?github.com((?!generated_pages/preview).)*$`.
4. Add a title and save.
*/
@amitmerchant1990
amitmerchant1990 / hackernews_night_mode.css
Created November 9, 2016 09:22
HackerNews Night Mode
/**
A nifty little CSS to experience HN in night mode using Stylish.
1. Install the Stylish(https://chrome.google.com/webstore/detail/stylish/fjnbnpbmkenffdnngjfgmeleoegfcffe?hl=en) extension for Chrome.
2. Open up extension options and paste the whole CSS mentioned below.
3. Specify the "URLs on the domian to" to be `news.ycombinator.com`.
4. Add a title and save.
*/
body {
font-family: Verdana, Geneva, sans-serif;
@amitmerchant1990
amitmerchant1990 / stylish.css
Last active December 28, 2018 00:32
GitHub Fixed Header for better accessibility.
/**
1. Install the Stylish(https://chrome.google.com/webstore/detail/stylish/fjnbnpbmkenffdnngjfgmeleoegfcffe?hl=en) extension for Chrome.
2. Open up extension options and paste the whole CSS mentioned below.
3. Specify the domain name to be `github.com`.
4. Add a title and save.
*/
.header {
padding-top: 10px;
padding-bottom: 10px;
@amitmerchant1990
amitmerchant1990 / git-ingredients.md
Last active August 31, 2016 12:50
git-ingredients
git install on ubuntu
sudo apt-get install git

point your local repository to remote repository

git remote add origin git@....repo_url
https://maven-global.slack.com/files/amit.merchant/F259FSJUW/correo-darwin-x64.zip
@amitmerchant1990
amitmerchant1990 / gist:34061136cc0a1fe926402814ba111f86
Created August 26, 2016 08:36
CSS : Center Text in middle of page
h1 {
left: 0;
line-height: 200px;
margin-top: -100px;
position: absolute;
text-align: center;
top: 50%;
width: 100%;
}

Keybase proof

I hereby claim:

  • I am amitmerchant1990 on github.
  • I am amitmerchant (https://keybase.io/amitmerchant) on keybase.
  • I have a public key whose fingerprint is FBBA 8B64 4897 0F86 CAE1 1B7B 4F92 A08D 6724 0E6A

To claim this, I am signing this object:

@amitmerchant1990
amitmerchant1990 / ajax_abort.md
Last active August 29, 2015 13:56
JavaScript snippet for aborting ajax rquest if previous call has not been completed
jQuery(document).ready(function(){
    var currentRequest = null;
    jQuery('#searchbox').keyup(function() {
        var text = jQuery(this).val();
        currentRequest = jQuery.ajax({
            type: 'POST',
            data: 'search_text=' + text,
            url: 'AJAX_URL',
 beforeSend : function() { 
@amitmerchant1990
amitmerchant1990 / brand_new_repo_git.md
Last active July 23, 2019 22:27
Setup a brand new repo on Git
1) Configure your user and email for Git via the following command.
  • configure the user which will be used by git

  • Of course you should use your name

    git config --global user.name "Example Surname"

  • Same for the email address

    git config --global user.email "your.email@gmail.com"