Skip to content

Instantly share code, notes, and snippets.

View ShiponKarmakar's full-sized avatar
😍
<?php echo "Love Programming"; ?>

Shipon Karmakar ShiponKarmakar

😍
<?php echo "Love Programming"; ?>
View GitHub Profile
@ShiponKarmakar
ShiponKarmakar / Email & Name Preg Match.php
Last active October 7, 2018 18:28
All Preg Metch PHP , Js ETC
<?php
// Email
if(!(preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/", $email))){}
// User Name
if(!(preg_match("/^[A-Za-z][A-Za-z0-9]{5,21}$/", $username))){}
// Name
if(!(preg_match("/^(Mr|Mrs|Dr|Md)\.\ /", $name))){}
?>
@ShiponKarmakar
ShiponKarmakar / Header Top Fix Function.js
Last active November 20, 2021 04:39
Jquery All Source
// Check the initial Poistion of the Sticky Header
var stickyHeaderTop = $('#stickyheader').offset().top;
$(window).scroll(function(){
if( $(window).scrollTop() > stickyHeaderTop ) {
$('#stickyheader').css({position: 'fixed', top: '0px'});
$('#stickyalias').css('display', 'block');
$('#stickyheader').addClass('fix-top');
} else {
$('#stickyheader').css({position: 'static', top: '0px'});
$('#stickyalias').css('display', 'none');