Skip to content

Instantly share code, notes, and snippets.

View diggy's full-sized avatar

Peter J. Herrel diggy

View GitHub Profile
@aarongustafson
aarongustafson / lazy-loaded-markup.html
Last active March 8, 2018 09:35
Easy Responsive Images in ExpressionEngine with CE Image
<div class="module__image image--lazy"
data-image-src="Tim-Smith_220x140_220_140_int_c1.jpg"></div>
@GDmac
GDmac / pi.debug_override.php
Created June 22, 2014 08:55
Debug Override plugin, disable ExpressionEngine template debugging from a template
<?php
$plugin_info = array(
'pi_name' => 'debug_override',
'pi_version' =>'1.0',
'pi_author' =>'GDmac',
'pi_author_url' => '',
'pi_description' => '',
'pi_usage' => '{exp:debug_override override="all|ajax"} default is override on ajax calls',
);
@croxton
croxton / cpanel_vps_eecms_config.md
Last active September 5, 2021 23:34
Battle-tested cPanel VPS server configuration for medium traffic ExpressionEngine websites

"Medium traffic" = able to handle around 50 concurrent users on average.

If you want to handle 100+ concurrent users with the same modest hardware see the Varnish section below.

VPS

  • 4096 MB memory
  • 125GB SSD
  • 4 CPUs
  • Cpanel
@octocat
octocat / .gitignore
Created February 27, 2014 19:38
Some common .gitignore configurations
# Compiled source #
###################
*.com
*.class
*.dll
*.exe
*.o
*.so
# Packages #
@gitaarik
gitaarik / git_submodules.md
Last active May 1, 2024 12:25
Git Submodules basic explanation

Git Submodules basic explanation

Why submodules?

In Git you can add a submodule to a repository. This is basically a repository embedded in your main repository. This can be very useful. A couple of usecases of submodules:

  • Separate big codebases into multiple repositories.
@aaronwaldon
aaronwaldon / 1) readme.md
Last active May 13, 2021 09:26
How to set up Gulp for Compass compilation and minification, JavaScript minification, livereloading, and use with ExpressionEngine.

How to set up Gulp with an ExpressionEngine project

I freaking love working with technologies like Grunt and Gulp, and wanted to share how to get my current EE front-end workflow set up. With a few tweaks, this can also be used with virtually any other sites (I've used it with Laravel, static sites, Craft, etc).

Install Node.js

  • If Node is not yet installed on the machine, it will need to be installed

Install Gulp (if needed)

@brandonkelly
brandonkelly / templating.md
Last active February 7, 2024 15:20
Templating in EE vs. Craft
@dr-dimitru
dr-dimitru / Social RESTful URLs snippet.md
Last active January 28, 2023 03:57
Social links, +1s and shares using only HTML (no JS)
@gregrickaby
gregrickaby / display-social-media-counts.php
Last active February 6, 2017 08:56
Display Likes, Tweets, Pageviews, and Comment Counts. Use transient cache to store data for 30 minutes.
<?php
/**
* Get tweet count from Twitter API (v1.1)
*/
function wds_post_tweet_count( $post_id ) {
// Check for transient
if ( ! ( $count = get_transient( 'wds_post_tweet_count' . $post_id ) ) ) {
@lavoiesl
lavoiesl / subdirectory_loader.php
Last active June 15, 2022 17:03
MU plugins subdirectory loader. Enables the loading of plugins sitting in mu-plugins (as folders)
<?php
/**
* Plugin Name: MU plugins subdirectory loader
* Plugin URI: https://gist.github.com/lavoiesl/6302907
* Description: Enables the loading of plugins sitting in mu-plugins (as folders)
* Version: 0.1
* Author: github@lavoie.sl
* Author URI: http://blog.lavoie.sl/
*