Skip to content

Instantly share code, notes, and snippets.

View amitmerchant1990's full-sized avatar

Amit Merchant amitmerchant1990

View GitHub Profile
@tobitailor
tobitailor / get_barcode_from_image.js
Created June 1, 2010 19:33
Barcode recognition with JavaScript - Demo: http://bit.ly/djvUoy
/*
* Copyright (c) 2010 Tobias Schneider
* This script is freely distributable under the terms of the MIT license.
*/
(function(){
var UPC_SET = {
"3211": '0',
"2221": '1',
"2122": '2',
@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
@benbalter
benbalter / excerpt.md
Last active December 15, 2022 20:28
Example of how to use Jekyll's `excerpt` tag.

If your post looked something like:

# Awesome Blog Post

Here is an example post to show how to use the new `excerpt` tag.

The excerpt tag provides a quick and easy way to tease a post by exposing only the first paragraph such as on a blog index page.
@rxaviers
rxaviers / gist:7360908
Last active May 8, 2024 23:12
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@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) {
@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');
@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; }
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],

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:

@btfak
btfak / useHexo.md
Created May 26, 2016 09:41
How to use Hexo and deploy to GitHub Pages