Skip to content

Instantly share code, notes, and snippets.

View meetKowshik's full-sized avatar

Kowshik Ahmed meetKowshik

  • Dhaka, Bangladesh
View GitHub Profile
@meetKowshik
meetKowshik / convert px to rem sass function
Created November 6, 2018 08:46
convert px to rem sass function
$baseFontSize : 16; // it's the body font size
@function rem($pixels, $context: $baseFontSize) {
@if (unitless($pixels)) {
$pixels: $pixels * 1px;
}
@if (unitless($context)) {
$context: $context * 1px;
}
@meetKowshik
meetKowshik / Smooth Scroll
Created October 2, 2018 18:38
Smooth Scroll
// Select all links with hashes
$('a[href*="#"]')
// Remove links that don't actually link to anything
.not('[href="#"]')
.not('[href="#0"]')
.click(function(event) {
// On-page links
if (
location.pathname.replace(/^\//, '') == this.pathname.replace(/^\//, '')
&&
@meetKowshik
meetKowshik / Installation process of stencil framework
Last active August 6, 2018 21:44
Installation process of stencil framework
Noted Things for Big Commerce
1. Learn about YAML first(Basic)
2. Learn about handelbar js (Basic)
3. Learn About Stencil
4. Learn About Legacy Framework
For Development purpose you need to have sharp knowledge about
above topics
For Customization purpose or front end matter you need to have
@meetKowshik
meetKowshik / Calendar Icon added in input date
Last active August 16, 2018 10:42
Calendar Icon added in input date
// date spinning
::-webkit-inner-spin-button{display: none;}
input[type="date"] {
position: relative;
}
input[type="date"]::-webkit-calendar-picker-indicator {
background: none;
color: transparent;
# Video Attributes
## height + width
- if you leave them out, the browser uses the intrinsic `width` of the video resource (if available)
- otherwise it uses the intrinsic `width` of the poster frame
- if neither available, the browsers default is 300px
- if you specify the one value but not the other, the browser adjusts the size of the unspecified dimension to preserve the video's aspect ratio
- if you set both values to an aspect ratio that doesn't match that of the video, the video is not stretched to those dimensions but is rendered letterboxed inside the video element of the specified size while retaining the aspect ratio
@meetKowshik
meetKowshik / CRLF true for linux
Created May 20, 2018 23:48
solution for CRLF will be replaced by LF in linux
$ git config --global core.autocrlf true
@meetKowshik
meetKowshik / gulp-for-beginners
Last active May 17, 2018 23:07
gulp-for-beginners
install gulp
npm install gulp -g (windows)
sudo npm install gulp -g (mac)
in project file
the structure will be
apps(this folder will be used for developer purpose where all the
css, js, images, fonts, sass file included)
@meetKowshik
meetKowshik / Using SVG icon for html
Created April 14, 2018 06:26
Using SVG icon for html
-go to icomoon.io
-click icomoon app
-scroll to down
- click add icons from library
- then choose encrypto
- then select the icons
- then click generate svg and download
- copy svg icon from svg folder and also copy symbol-defs.svg which will be saved as sprite.svg
in html
<svg>
@meetKowshik
meetKowshik / enable css loader in react
Last active March 26, 2018 07:45
Enable css loader in react project
First you need to run
npm run eject
then in config folder you will find webpack-config-devs.js and webpack-config-prod.js, where you will search the css-loader function
paste this code
modules: true,
localIdentName: '[name]__[local]__[hash:base64:5]'