Skip to content

Instantly share code, notes, and snippets.

Talk is cheap. Check My Code, Blog and Portfolio.

Shameem Reza shameemreza

Talk is cheap. Check My Code, Blog and Portfolio.
View GitHub Profile
ravahdati / convert-wp-image-to-base64.php
Last active January 20, 2021 14:09
Convert WordPress image to base64 by attach_id
View convert-wp-image-to-base64.php
function tidaweb_image_url_to_base64( $attach_id )
// get image src -> $image_info[0]
$image_info = wp_get_attachment_image_src( $attach_id, 'full' );
$image_file = file_get_contents( $image_info[0] );
// get filename from url
$filename = basename( get_attached_file( $attach_id ) );
$image_file_type = wp_check_filetype( $filename );
jaredatch / custom-validation.js
Last active January 28, 2022 11:22
WPForms adding a custom validation rule
View custom-validation.js
;(function($) {
var JA_Custom_Validation = {
* Start the engine.
* @since 1.0.0
init: function() {
remcotolsma /
Last active October 31, 2022 17:00
WordPress development environment on Mac with Brew, Nginx, PHP 7, PHP-FPM, MariaDB, phpMyAdmin and more

WordPress development environment on Mac with Brew, Nginx, PHP 7, PHP-FPM, MariaDB, phpMyAdmin and more


brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
DustonMcGroarty / genesis-sales-page.php
Last active July 14, 2019 20:46
Genesis Sales Page Template
View genesis-sales-page.php
Template Name: Sales Page
//* Add custom body class to the head
add_filter( 'body_class', 'dm_add_body_class' );
function dm_add_body_class( $classes ) {
$classes[] = 'dm-sales';
srikat / style.css
Created January 13, 2014 02:17
CSS to make the output of Jetpack Subscription widget better in Genesis child theme, News 2.1.2. Details with screenshots:
View style.css
.jetpack_subscription_widget .widget-wrap {
background: url("images/enews.png") no-repeat 260px 15px;
#subscribe-email #subscribe-field {
width: 175px;
padding: 5px;
font-size: 13px;
margin: 10px -2px 0 0;
malarkey / Contract Killer
Last active May 5, 2023 08:46
The latest version of my ‘killer contract’ for web designers and developers
View Contract Killer

When times get tough and people get nasty, you’ll need more than a killer smile. You’ll need a killer contract.

Used by 1000s of designers and developers Clarify what’s expected on both sides Helps build great relationships between you and your clients Plain and simple, no legal jargon Customisable to suit your business Used on countless web projects since 2008


keithmorris / .htaccess
Created June 30, 2012 12:09
CodeIgniter .htaccess file
View .htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
#Removes access to the system folder by users.
#Additionally this will allow you to create a System.php controller,
#previously this would not have been possible.
#'system' can be replaced if you have renamed your system folder.
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php?/$1 [L]
amrishodiq / Lbs.php
Created April 2, 2012 07:57
PHP Code Igniter library class to get latitude & longitude, get address for specified latitude & longitude, get direction from one place to another place, and so on. Most LBS concept I implemented with PHP.
View Lbs.php
* Written by Amri Shodiq.
* Do not hesitate to copy and paste this code.
* It's not embarassing.
if (!defined('BASEPATH'))
exit ('No direct script access allowed');