Skip to content

Instantly share code, notes, and snippets.

View leek's full-sized avatar

Chris Jones leek

View GitHub Profile
@scottsb
scottsb / m2-cache-cheat-sheet.md
Last active February 22, 2024 14:56
Magento 2 Cache Cheat Sheet

Magento 2 Cache Cheat Sheet

This page lists what caches or directories you will need to clear to apply various types of changes. It is consolidated and adapted from the complete official documentation on directories and caches.

💁 If your development environment supports it, you are better off using Vinai's automatic cache cleaner. As of this writing, the primary reason why it might not work is if your code is hosted on a NFS share (common with Vagrant).

.flex {
display: flex;
.align-center {
margin: auto;
align-self: center;
}
.align-left {
margin-right: auto;
@manuhabitela
manuhabitela / bootstrap-breakpoint-indicator-bookmarklet.js
Last active December 2, 2015 07:52
Bookmarklet showing current bootstrap breakpoint at the top left of the page
(function(){
var script = document.createElement("script");
script.src = "https://rawgit.com/Leimi/122905f66682fb3c4927/raw/source.js";
document.getElementsByTagName("head")[0].appendChild(script);
})();
@molotovbliss
molotovbliss / logrotate
Last active April 26, 2021 17:33
Magento Log Rotate with logrotate
The magento-logrotate.conf file contents:
/path/to/magento/var/log/*log {
rotate 7
daily
compress
missingok
notifempty
copytruncate
create 660 www-data www-data

Includes:

  • Configuration
  • BrowserSync
  • Environments (e.g.,: --environment=production)
  • Image optimization (gif, jpg, png, and svg)
  • Sass compilation with external libraries
  • Bower installed Sass libraries example(s)
  • CSS processing with Pleeease
#!/bin/bash
#
# The MIT License (MIT)
#
# Copyright (c) 2014 Mathias Leppich <mleppich@muhqu.de>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
<?php
App::after(function($request, $response)
{
/**
* HTML Minification
* https://gist.github.com/zmsaunders/5619519
* https://gist.github.com/garagesocial/6059962
*/
if (Config::get('project.minify.html', false) !== false)
@shakdaniel
shakdaniel / gulpfile.js
Last active September 17, 2021 02:48
Gulpfile for my workflow.
// npm install --save-dev gulp gulp-jade gulp-stylus gulp-autoprefixer gulp-minify-css gulp-jshint jshint-stylish gulp-uglify gulp-concat gulp-imagemin imagemin-pngcrush gulp-rename gulp-clean gulp-newer gulp-filesize gulp-size gulp-notify browser-sync
// GULP DEPENDENCIES & PLUGINS
var gulp = require('gulp'),
jade = require('gulp-jade'),
stylus = require('gulp-stylus'),
prefix = require('gulp-autoprefixer'),
mincss = require('gulp-minify-css'),
jshint = require('gulp-jshint'),
stylish = require('jshint-stylish'),
@mouton-rebelle
mouton-rebelle / gulpfile.js
Created January 15, 2014 10:56
Working gulpfile with compass & livereload (workaround for compass issue not streaming modified files)
/* global require */
var lr = require('tiny-lr'),
gulp = require('gulp'),
compass = require('gulp-compass'),
livereload = require('gulp-livereload'),
server = lr();
gulp.task('compass', function() {
gulp.src('./sass/*.scss')
.pipe(compass({
@parhamr
parhamr / 0: Magento 1.12 Enterprise multi-store cluster configuration.md
Last active October 13, 2023 14:20
A highly available, fault tolerant, distributed, and load balanced LEMP cluster.