Skip to content

Instantly share code, notes, and snippets.

View amitmerchant1990's full-sized avatar

Amit Merchant amitmerchant1990

View GitHub Profile
@amitmerchant1990
amitmerchant1990 / keyboard_shortcut.js
Last active August 29, 2015 13:56
IMPLEMENT KEYBOARD SHORTCUTS FOR YOUR WEBSITE
$(document).ready(function() {
// I have used $(this) so it "listens" on any part of the webpage (document)
// Change this to a single or series of elements if required
$(this).live("keyup", function(e) {
if($("input, textarea").is(":focus")) {
// Do nothing because the user might be typing
return false;
} else {
switch(e.keyCode) {
@LeaVerou
LeaVerou / dabblet.css
Created February 23, 2014 02:10
Unprefixed animations do nothing in Blink
/**
* Unprefixed animations do nothing in Blink
*/
@keyframes foo {
to { background: lime; }
}
body { background: red; animation: foo 1s infinite; }
@luke3butler
luke3butler / stylish.css
Last active September 19, 2016 08:42 — forked from amitmerchant1990/stylish.css
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.
*/
@media (min-height: 850px) {
.header {
padding-top: 10px;
@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 / 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 / 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 / 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 / questions.md
Last active July 12, 2019 04:11
Questions
1) What is Asynchronous call?
  • A function that enables processing to continue without waiting for function to return the value.
2) What is Full-text search ?
  • In this we can match a word or phrase in multiple columns and fetch rows accordingly. The Full-text searches are supported for MyISAM tables only ex. : SELECT * FROM articles WHERE MATCH (title,body) AGAINST ('database');
@sindresorhus
sindresorhus / github-email.sh
Created January 11, 2013 17:46
Magically retrieves a GitHub users email even though it's not publicly shown
#!/bin/bash
# Created by Sindre Sorhus
# Magically retrieves a GitHub users email even though it's not publicly shown
[ "$1" = "" ] && echo "usage: $0 <GitHub username> [<repo>]" && exit 1
[ "$2" = "" ] && repo=`curl "https://api.github.com/users/$1/repos?type=owner&sort=updated" -s | sed -En 's|"name": "(.+)",|\1|p' | tr -d ' ' | head -n 1` || repo=$2
curl "https://api.github.com/repos/$1/$repo/commits" -s | sed -En 's|"(email\|name)": "(.+)",?|\2|p' | tr -s ' ' | paste - - | sort -u -k 1,1