Skip to content

Instantly share code, notes, and snippets.

@aelk00
aelk00 / remove-likes.md
Last active March 1, 2024 00:58
Remove all your facebook likes
@CodeMyUI
CodeMyUI / css-only-todo-list-checkbox-animation.markdown
Created November 21, 2017 09:45
☑️ CSS-only Todo List Checkbox Animation
@bgarrant
bgarrant / ExpressionEngine Laravel Valet.md
Last active March 7, 2022 00:32
How to setup Laravel Valet for an ExpressionEngine site needing PHP 5.6 or PHP 7.1 Support
@jtrascap
jtrascap / config.json
Created September 19, 2016 08:32 — forked from anonymous/config.json
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
anonymous
anonymous / config.json
Created September 19, 2016 08:30
Bootstrap Customizer Config
{
"vars": {
"@gray-base": "#000",
"@gray-darker": "lighten(@gray-base, 13.5%)",
"@gray-dark": "lighten(@gray-base, 20%)",
"@gray": "lighten(@gray-base, 33.5%)",
"@gray-light": "lighten(@gray-base, 46.7%)",
"@gray-lighter": "lighten(@gray-base, 93.5%)",
"@brand-primary": "darken(#428bca, 6.5%)",
"@brand-success": "#5cb85c",
@croxton
croxton / nesting_ee_blocks_with_stash.md
Created November 25, 2015 10:09
Nesting EE blocks with Stash
{project_gallery}

	{!-- section --}
	{bk_gallery_section}

		<section class="gallery">

			{!-- save count of current section --}
			{exp:stash:set_value name="section_index" value="{blocks:count:of:type}" random}
@paulirish
paulirish / what-forces-layout.md
Last active September 23, 2024 03:27
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Generally, all APIs that synchronously provide layout metrics will trigger forced reflow / layout. Read on for additional cases and details.

Element APIs

Getting box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
@murtaugh
murtaugh / eems-droplet-for-EE2.md
Last active October 27, 2021 03:33
Set up a DigitalOcean droplet for ExpressionEngine

(This is an updated version of Clearfire's tutorial, which is excellent, but has become slightly outdated as Digital Ocean updates their applications.)

  1. Create your droplet. Name it, select your size and location, then hit the Applications tab and select (as of this writing) "LAMP on 14.04". Add your SSH key if you want, and submit.
  2. SSH into your new droplet, and maybe check to make sure the following PHP modules have been installed: (In my recent experience, these have all been installed automatically, but that could change, and it takes 10 seconds to check.)

    apt-get install php5-gd

    apt-get install php5-mysql

    apt-get install php5-curl

  3. Make sure mod_rewrite is enabled, with a2enmod rewrite.
  4. If you like, increase PHP's upload_max_filesize and post_max_filesize values by editing the php.ini file, with this: nano /etc/php5/apache2/php.ini
  5. Give Apach
@paul-frost
paul-frost / gist:2ea5c8ce57aec116ed75
Last active February 21, 2019 09:43
Responsive images in ExpressionEngine WYGWAM field
This method requires the CE Image addon.
Tell your editors to change the width/height/alignment in the image properties pop up to 300px or whatever and set the alignment if they want, but the actual size displayed on the page will be decided by you in the template code and CSS.
In the EE template:
{exp:ce_img:bulk max="500" crop="no" allow_scale_larger="no" quality="80" output='<a href="{orig}" class="embeded_image" title="{attr:title}" alt="{attr:alt}" style="{attr:style}"><img src="{made}" /></a>'}
{wygwam_field}
{/exp:ce_img:bulk}
In the CSS:
@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>