Skip to content

Instantly share code, notes, and snippets.

View istiaqhossain's full-sized avatar
🏗️
Building Myself

Istiaq Hossain istiaqhossain

🏗️
Building Myself
View GitHub Profile

Conventional Commit Messages starline

See how a minor change to your commit message style can make a difference.

Tip

Take a look at git-conventional-commits , a CLI util to ensure these conventions, determine version and generate changelogs

Commit Message Formats

Default

Programming

oop solid design pattern clean code

Language

php javascript

Example of commit message convention:

<type>(<scope>): <subject>

<body>

<footer>
@istiaqhossain
istiaqhossain / mixins.scss
Last active February 4, 2022 07:48
SCSS Mixins
/// Adds a browser prefix to the property
/// @param {*} $property Property
/// @param {*} $value Value
@mixin css3-prefix($property, $value) {
-webkit-#{$property}: #{$value};
-khtml-#{$property}: #{$value};
-moz-#{$property}: #{$value};
-ms-#{$property}: #{$value};
-o-#{$property}: #{$value};
Each YouTube video has 4 generated images. They are predictably formatted as follows:
http://img.youtube.com/vi/<insert-youtube-video-id-here>/0.jpg
http://img.youtube.com/vi/<insert-youtube-video-id-here>/1.jpg
http://img.youtube.com/vi/<insert-youtube-video-id-here>/2.jpg
http://img.youtube.com/vi/<insert-youtube-video-id-here>/3.jpg
The first one in the list is a full size image and others are thumbnail images. The default thumbnail image (ie. one of 1.jpg, 2.jpg, 3.jpg) is:
http://img.youtube.com/vi/<insert-youtube-video-id-here>/default.jpg
@istiaqhossain
istiaqhossain / my-plugin.php
Created July 11, 2021 12:34
Woocommerce - overriding the template through a plugin
<?php
/**
* Override default WooCommerce templates and template parts from plugin.
*
* E.g.
* Override template 'woocommerce/loop/result-count.php' with 'my-plugin/woocommerce/loop/result-count.php'.
* Override template part 'woocommerce/content-product.php' with 'my-plugin/woocommerce/content-product.php'.
*
* Note: We used folder name 'woocommerce' in plugin to override all woocommerce templates and template parts.
* You can change it as per your requirement.
@istiaqhossain
istiaqhossain / README.md
Created October 13, 2020 23:13 — forked from joyrexus/README.md
Nested grouping of arrays

nest.js

A multi-level groupBy for arrays inspired by D3's nest operator.

Nesting allows elements in an array to be grouped into a hierarchical tree structure; think of it like the GROUP BY operator in SQL, except you can have multiple levels of grouping, and the resulting output is a tree rather than a flat table. The levels in the tree are specified by key functions.

See this fiddle for live demo.

/node_modules
//http://jsperf.com/vanilla-css
/* v3 */
function css(el, styles, val) {
Object.keys(styles).forEach(function (k) {
el.style[k]= styles[k];
});
}
@istiaqhossain
istiaqhossain / responsive-snippet.css
Last active February 23, 2022 06:32
Media Queries for Responsive Html Template
/*
[Responsive Stylesheet]
Project Name:
Version: 1.0.0
Author:
Website:
Last Update: