Skip to content

Instantly share code, notes, and snippets.

View raihan004's full-sized avatar
🏠
Working from home

MH Raihan raihan004

🏠
Working from home
View GitHub Profile
@raihan004
raihan004 / 0_reuse_code.js
Last active September 13, 2015 08:40
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@raihan004
raihan004 / btn-responsive.css
Created September 13, 2015 09:02
responsive bootstrap button using media queries
@media (max-width: 768px) {
.btn-responsive {
padding:2px 4px;
font-size:80%;
line-height: 1;
border-radius:3px;
}
}
@media (min-width: 769px) and (max-width: 992px) {
@raihan004
raihan004 / index.html
Last active September 17, 2015 23:47
js calculator // source http://jsbin.com/tenevo
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>JS Bin</title>
<style id="jsbin-css">
span{
display: inline-block;
width: 24px;
height: 20px;
@raihan004
raihan004 / filter-vendor.liquid
Created May 14, 2017 06:34 — forked from Chrisedmo/filter-vendor.liquid
Shopify: Filter by Vendor
<!-- add the vendor as product tag to product then use this code in collection.liquid -->
<!-- if we are on a collection page that is either custom or smart -->
{% if collection.url != blank %}
<h4>Shop by vendor:</h4>
<ul>
{% for product_vendor in collection.all_vendors %}
<li>
{% if current_tags contains product_vendor %}
<a class="active" href="{{ collection.url }}">{{ product_vendor }}</a>
{% else %}
@raihan004
raihan004 / settings_schema.json
Last active June 6, 2017 06:07
This gitst for shopify plartform. Make Dynamics youtube video section
{
"name": "Youtube",
"settings":[
{
"type": "header",
"content": "Youtube Section"
},
{
"type": "text",
"id": "youtube_video_link",
<!-- Ajax API -->
{{ '//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js' | script_tag }}
{{ 'api.jquery.js' | shopify_asset_url | script_tag }}
<style type="text/css">
#rv__recent_products.rv__grid{width: 100%; margin-top: 20px;}
.rv__grid .row{ display: block; clear: both;}
.rv__grid .rv__row .rv__column{ float: left; }
.rv__grid .rv__row .rv__column.rv__one{ width: 8.3%; }
.rv__grid .rv__row .rv__column.rv__two{ width: 16.66%; }
@raihan004
raihan004 / shopify-auto-currencies-switcher.js
Created December 27, 2017 06:11 — forked from chrisgrabinski/shopify-auto-currencies-switcher.js
(Shopify) Automatically change a shop's currency based on the customer's geolocation
// Dependencies
// - https://github.com/carolineschnapp/currencies
// Don't change currency if Cookie has been already set
if (Currency.cookie.read() == null) {
jQuery.ajax( {
url: '//freegeoip.net/json/',
type: 'GET',
dataType: 'jsonp',
@raihan004
raihan004 / Adding a search popup.md
Created January 16, 2018 08:44 — forked from teckx5/Adding a search popup.md
Adding a search box popup / modal to the Brooklyn Theme

Issue

Brooklyn doesn't have a search box by default and adding one to the header somewhat disrupts the aesthetic of the theme. Instead of adding just an icon linking to the search page, why not adding a modal using the already built in popup plugin?

image

Did you see that fade in?! It's actually very smooth IRL.

Steps:

@raihan004
raihan004 / formspree.html
Created April 10, 2018 12:32 — forked from JWizerd/formspree.html
JS: Ajax send forms using the most excellent Formspree » http://formspree.io #snippet
<form id="contact-form" action="//formspree.io/your@email.com" method="post">
<input type="text" name="Name" placeholder="Name" required>
<input type="email" name="Email" placeholder="Email" required>
<textarea name="Message" cols="30" rows="6" placeholder="Message" required></textarea>
<!-- CONFIG -->
<input class="is-hidden" type="text" name="_gotcha">
<input type="hidden" name="_subject" value="Subject">
<input type="hidden" name="_cc" value="email@cc.com">
<!-- /CONFIG -->
<input class="submit" type="submit" value="Send">
@raihan004
raihan004 / remove-empty-p.js
Created April 14, 2018 09:09 — forked from MichaelVanDenBerg/remove-empty-p.js
Remove empty <p> tags with jQuery.
/**
* Remove empty <p> tags.
*
* See: http://stackoverflow.com/questions/27781798/wordpress-retain-formatting-when-calling-extended-content#comment43990361_27782619
* This seems to be the easiest solution. Remove this function if this ever gets fixed.
* Credits: http://stackoverflow.com/questions/6092855/how-do-i-remove-empty-p-tags-with-jquery
*/
( function( $ ) {
$( 'p' ).each( function() {