Skip to content

Instantly share code, notes, and snippets.

View arnaimbd's full-sized avatar

Arifur Rahman Naim arnaimbd

View GitHub Profile
@petenelson
petenelson / custom-post-type-title-placeholder.php
Created May 2, 2013 14:51
WordPress - Change custom post type "Enter Title Here" placeholder
// via http://www.paulund.co.uk/change-the-enter-title-text-for-custom-post-types
// just saving it here for later reference
function change_default_title( $title ){
$screen = get_current_screen();
if ( $screen->post_type == 'product' ) {
return 'Enter New Product Here';
}
}
add_filter( 'enter_title_here', 'change_default_title' );
@claudiosanches
claudiosanches / custom-my-account-endpoint.php
Last active October 28, 2024 06:17
Example of custom My Account endpoint.
<?php
class My_Custom_My_Account_Endpoint {
/**
* Custom endpoint name.
*
* @var string
*/
public static $endpoint = 'my-custom-endpoint';
@hasinhayder
hasinhayder / charlie-foxtrot.go
Last active May 20, 2020 19:16
converts a string to NATO phonetic alphabet equivalents
/* Charlie Foxtrot - If You Know What It Means ;) */
package main
import (
"fmt"
"strings"
"bufio"
"os"
)
@obiPlabon
obiPlabon / উত্তরাধিকার.js
Last active January 26, 2017 12:07
Code snippet from http://উত্তরাধিকার.বাংলা/
/**
* Code snippet from http://উত্তরাধিকার.বাংলা/
*
* Really inspiring if you wanna know code smell
* and how to write bad code
*/
function determine_ashaba(sel_rel_arr,ashabas_from_qh,exclude_from_qh,qhs)
{
var ashabas = [];
@obiPlabon
obiPlabon / non-semantic.html
Created January 22, 2017 05:41
Simple difference between Semanctic, Partial Semanctic and Non Semantic markup
<div class="article">
<div class="heading">Article Heading</div>
<div class="article-content">
<div class="paragraph">
Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
</div>
<div class="paragraph">
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
@sourovroy
sourovroy / setHTTPRequest.php
Last active November 5, 2017 18:33
This is a source file of a article about PHP cURL. http://sourov.im/send-http-request-using-php-curl/
<?php
/*
|---------------------------------------------------
| PHP class to send HTTP request in better way
|---------------------------------------------------
*/
if(!class_exists('setHTTPRequest')){
class setHTTPRequest
{
/**
@obiPlabon
obiPlabon / wc-template-override.php
Last active September 26, 2020 12:50
Helper class to override WooCommerce templates from plugin
<?php
/**
* WooCommerce template overriding class
*
* @author obiPlabon
*/
class WC_Template_Override {
/**