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 / 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');
@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 / contact-form.php
Last active October 7, 2018 18:27
PHP Scripts
<?php
// Naming Constant
define( "RECIPIENT_NAME", "John Doe" );
define( "RECIPIENT_EMAIL", "someone@mail.com" );
// Values
$success = false;
$senderName = isset( $_POST['username'] ) ? preg_replace( "/[^\.\-\' a-zA-Z0-9]/", "", $_POST['username'] ) : "";
## Sublime Text 3 Serial key build is 3176
> * Added these lines into /etc/hosts
127.0.0.1 www.sublimetext.com
127.0.0.1 license.sublimehq.com
> * Used the license key
----- BEGIN LICENSE -----
@ShiponKarmakar
ShiponKarmakar / .htaccess
Last active January 23, 2024 02:20
Most Useful and Helpful .htaccess Code
#stop directory browsing
Options All -Indexes
# SSL Https active Force non-www
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
<?php
require_once "Mail.php";
$from = "Sandra Sender <info@hasmukh.co.in>";
$to = "Ramona Recipient <test@gmail.com>";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
$host = "fortune.solidhosting.pro";
$port = "587";
$username = "info@shipon .com";
$password = "8vabTURf%j+G";
@ShiponKarmakar
ShiponKarmakar / README.MD
Created December 17, 2018 16:51 — forked from AminulBD/README.MD
BD Domain ability checker with php.

(DOT) .BD DOMAIN ABILITY CHECKER

You can use this as WHMCS or other domain checker to check ability of .bd domains. This is a concept for how to create your own whois server.

WARNING: WHEN YOU USE THIS SCRIPT, YOU KNOW WHAT YOU ARE DOING. I'M NOT RESPONSIVE FOR ANY PROBLEM

First login to your server (Any distro) and install the following dependencies.

For ubuntu user:

apt-get install xinetd dnsutils php-cli

@ShiponKarmakar
ShiponKarmakar / like-it-enqueue.php
Created December 22, 2018 16:54 — forked from shizhua/like-it-enqueue.php
Add a like button without a plugin in WordPress
add_action( 'wp_enqueue_scripts', 'pt_like_it_scripts' );
function pt_like_it_scripts() {
if( is_single() ) {
wp_enqueue_style( 'like-it', trailingslashit( plugin_dir_url( __FILE__ ) ).'css/like-it.css' );
if (!wp_script_is( 'jquery', 'enqueued' )) {
wp_enqueue_script( 'jquery' );// Comment this line if you theme has already loaded jQuery
}
wp_enqueue_script( 'like-it', trailingslashit( plugin_dir_url( __FILE__ ) ).'js/like-it.js', array('jquery'), '1.0', true );
@ShiponKarmakar
ShiponKarmakar / WHMCS-search-integration.html
Last active March 30, 2019 09:30
Here’s the WHMCS search/integration code:
<form action="cart.php?a=add&domain=register" method="post">
Domain: <input type="text" name="sld" size="20" />
<select name="tld">
<option>.com</option>
<option>.net</option>
<option>.org</option>
<option>.eu</option>
<option>.us</option>
</select>
<input type="submit" value="Go" />
@ShiponKarmakar
ShiponKarmakar / php.json
Last active August 7, 2019 08:49
VS code PHP User Snippet
{
// Function
"function": {
"prefix": "function",
"body": [
"function $1() {",
" $2",
"}",
],
"description": "Normal Function"