Skip to content

Instantly share code, notes, and snippets.

View EmranAhmed's full-sized avatar
🏠
Working from home

Emran Ahmed EmranAhmed

🏠
Working from home
View GitHub Profile
<?php
/*
* Plugin Name: Commercial Client
* Plugin URI: http://pento.net/
* Description: A sample client plugin for showing updates for non-WordPress.org plugins
* Author: pento
* Version: 0.1
* Author URI: http://pento.net/
* License: GPL2+
*/
#! /bin/sh
#
# whatthecommit - Random commit message generator
#
# Show random commit message from http://whatthecommit.com/.
#
# Seungwon Jeong <seungwon0@gmail.com>
#
# Copyright 2011 by Seungwon Jeong
@EmranAhmed
EmranAhmed / gist:8023471
Last active December 31, 2015 17:59
WordPress Infinit Scroll
<?php
/**
* Infinite Scroll on the Homepage
*
* Display posts until the end of time
*
* @package WordPress
* @subpackage Lossip
* @since Lossip 1.0
*/
@EmranAhmed
EmranAhmed / 1. main.css
Last active January 11, 2024 01:29
CSS Responsive breakpoint, Media Query break point
/*==================================================
= Bootstrap 3 Media Queries =
==================================================*/
/*========== Mobile First Method ==========*/
/* Custom, iPhone Retina */
@media only screen and (min-width : 320px) {
}
Tip: Recursively convert files with DOS/Windows endian to UNIX endian.
# apt-get install dos2unix
$ cd directory
$ find . -name *.* -exec dos2unix {} \;
@EmranAhmed
EmranAhmed / wp-auto-update-enable.php
Created March 3, 2014 18:17
WP Auto Updates Enabler filters
<?php
/**
* Plugin Name: WP Auto Updates Enabler
* Plugin URI: http://www.imadalin.ro/wordpress/plugins/wp-auto-updates-enabler/
* Description: Enables auto update of all major and minor versions for Core, Themes and Plugins, disables Dev versions. No config, no options, just simple and fast.
* Version: 1.0
* Author: Madalin Ignisca
* Author URI: http://www.imadalin.ro/
* License: GPLv3
*/
@EmranAhmed
EmranAhmed / resource-link.txt
Last active July 18, 2018 12:33
Default WP Generated css classes
@EmranAhmed
EmranAhmed / all-wp-actions-filters.php
Last active August 29, 2015 13:57
Getting All WordPress Actions and Filters
<?php
function print_all_wp_actions() {
global $wp_actions;
echo 'all WordPress actions: <pre>';
print_r( $wp_actions );
echo '</pre>';
}
function print_all_wp_filters() {
alias php53='brew unlink php53 > /dev/null; brew unlink php54 > /dev/null; brew unlink php55 > /dev/null; brew link php53 > /dev/null; ln -sf /usr/local/Cellar/php53/5.3.26/libexec/apache2/libphp5.so /Users/admin/.phpenv/libphp5.so; ln -sf /usr/local/Cellar/php54/5.3.26/bin /Users/admin/.phpenv/bin; sudo apachectl restart; echo "PHP 5.3 Enabled";'
alias php54='brew unlink php53 > /dev/null; brew unlink php54 > /dev/null; brew unlink php55 > /dev/null; brew link php54 > /dev/null; ln -sf /usr/local/Cellar/php54/5.4.19/libexec/apache2/libphp5.so /Users/admin/.phpenv/libphp5.so; ln -sf /usr/local/Cellar/php54/5.4.19/bin /Users/admin/.phpenv/bin; sudo apachectl restart; echo "PHP 5.4 Enabled";'
alias php55='brew unlink php53 > /dev/null; brew unlink php54 > /dev/null; brew unlink php55 > /dev/null; brew link php55 > /dev/null; ln -sf /usr/local/Cellar/php55/5.5.3/libexec/apache2/libphp5.so /Users/admin/.phpenv/libphp5.so; ln -sf /usr/local/Cellar/php54/5.5.3/bin /Users/admin/.phpenv/bin; sudo apachectl restart; e
# LESS compiler
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} ^(.*)\.css
RewriteCond %1.less -f
RewriteRule ^(.*)\.css lessphp/less.php?f=$1.less