Skip to content

Instantly share code, notes, and snippets.

🧩
Focusing

Shipon Karmakar Shiponkormoker

🧩
Focusing
View GitHub Profile
@Shiponkormoker
Shiponkormoker / update-hide.php
Created Jul 27, 2019
Hide all WordPress update notifications in dashboard
View update-hide.php
<?php
// hide update notifications
function remove_wp_core_updates(){
global $wp_version;
return(object) array('last_checked'=> time(),'version_checked'=> $wp_version,);
}
add_filter('pre_site_transient_update_core','remove_wp_core_updates'); //hide updates for WordPress itself
add_filter('pre_site_transient_update_plugins','remove_wp_core_updates'); //hide updates for all plugins
@Shiponkormoker
Shiponkormoker / php.json
Last active Aug 7, 2019
VS code PHP User Snippet
View php.json
{
// Function
"function": {
"prefix": "function",
"body": [
"function $1() {",
" $2",
"}",
],
"description": "Normal Function"
@Shiponkormoker
Shiponkormoker / WHMCS-search-integration.html
Last active Mar 30, 2019
Here’s the WHMCS search/integration code:
View WHMCS-search-integration.html
<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" />
@Shiponkormoker
Shiponkormoker / like-it-enqueue.php
Created Dec 22, 2018 — forked from shizhua/like-it-enqueue.php
Add a like button without a plugin in WordPress
View like-it-enqueue.php
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 );
@Shiponkormoker
Shiponkormoker / README.MD
Created Dec 17, 2018 — forked from AminulBD/README.MD
BD Domain ability checker with php.
View README.MD

(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

View SMTPContactForm.php
<?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";
@Shiponkormoker
Shiponkormoker / .htaccess
Last active Jun 26, 2020
Most Useful and Helpful .htaccess Code
View .htaccess
#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]
View Sublime Text 3 Serial key build is 3176.txt
## 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 -----
View contact-form.php
<?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'] ) : "";
@Shiponkormoker
Shiponkormoker / Email & Name Preg Match.php
Last active Oct 7, 2018
All Preg Metch PHP , Js ETC
View Email & Name Preg Match.php
<?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))){}
?>
You can’t perform that action at this time.