Skip to content

Instantly share code, notes, and snippets.

Avatar
🦜
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
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
<?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
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
remcotolsma / README.md
Last active October 31, 2022 17:00
WordPress development environment on Mac with Brew, Nginx, PHP 7, PHP-FPM, MariaDB, phpMyAdmin and more
View README.md

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

Brew

http://brew.sh/

brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
@DustonMcGroarty
DustonMcGroarty / genesis-sales-page.php
Last active July 14, 2019 20:46
Genesis Sales Page Template
View genesis-sales-page.php
<?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
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: https://twitter.com/srikat/status/422551589824376832
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
malarkey / Contract Killer 3.md
Last active May 5, 2023 08:46
The latest version of my ‘killer contract’ for web designers and developers
View Contract Killer 3.md

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
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
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
<?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');