Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍💻
Deep in the code

Javier Villanueva jahvi

👨‍💻
Deep in the code
View GitHub Profile
@peterjaap
peterjaap / tailwind-font-weights-check.md
Last active Dec 16, 2020
Tailwind font-weights check
View tailwind-font-weights-check.md

Tailwind font-weights check

Check which font weights are used. I used this to determine which Google Fonts I want to include.

Before;

https://fonts.googleapis.com/css2?family=Lato:wght@100;200;300;400;500;600;700;800;900&display=swap
View Dockerfile
FROM wordpress:4.6.1-php5.6-apache
RUN yes | pecl install xdebug \
&& echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" > /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_enable=on" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.remote_autostart=on" >> /usr/local/etc/php/conf.d/xdebug.ini \
&& echo "xdebug.idekey=bonkers" >> /usr/local/etc/php/conf.d/xdebug.ini
@yvoronoy
yvoronoy / my.cnf
Last active Dec 11, 2020
MySQL Magento Config
View my.cnf
[mysqld]
## After edit config you have to remove log files and restart mysql server
## because after changing innodb-log-file-size you should recreate ib_logfiles
## Stop MySQL server
## rm /data/dir/ib_logfile*
## Run MySQL server
##Table open cache under MacOS and MySQL 5.6 should be 250.
##Otherwise you will get error MySQL server has gone away
##table-open-cache = 250
@adeekshith
adeekshith / .git-commit-template.txt
Last active Jan 12, 2021 — forked from Linell/.git-commit-template.txt
This commit message template helps you write great commit messages and enforce it across teams.
View .git-commit-template.txt
# <type>: (If applied, this commit will...) <subject> (Max 50 char)
# |<---- Using a Maximum Of 50 Characters ---->|
# Explain why this change is being made
# |<---- Try To Limit Each Line to a Maximum Of 72 Characters ---->|
# Provide links or keys to any relevant tickets, articles or other resources
# Example: Github issue #23
@mam08ixo
mam08ixo / data-upgrade-0.1.67-0.1.68.php
Last active Oct 30, 2015 — forked from avoelkl/upgrade-0.1.67-0.1.68.php
SUPEE-6788 variable + block setup script. 1.) Create a new module or extend a current one. 2.) Create a new install or setup script with the variables and blocks which are not whitelisted yet.
View data-upgrade-0.1.67-0.1.68.php
<?php
/**
* @category Namespace
* @package Namespace_Module
* @author Anna Völkl
* @author Christoph Aßmann
* @author Fabian Schmengler
*/
/** @var Mage_Core_Model_Resource_Setup $installer */
@mroffice
mroffice / SUPEE 6788 patch for Magento Community Edition.md
Last active Jul 1, 2020
How I patched our Magento 1.9.2.1 CE with the notorious SUPEE 6788 patch that breaks all your extensions.
View SUPEE 6788 patch for Magento Community Edition.md

See Updates for new additional info

What is SUPEE-6788?

SUPEE-6788 is a bundle of patches for Magento. From the Magento Commerce website:

[SUPEE-6788] provides protection against several types of security-related issues, including remote code execution, information leaks and cross-site scripting.

## Why is it more complicated than previous patches?

@gwillem
gwillem / magento-nginx.conf
Last active Dec 22, 2020
Battle-tested Nginx configuration for Magento (source: www.hypernode.com)
View magento-nginx.conf
# This is an annotated subset of the Nginx configuration from our Magento production platform @ www.hypernode.com
# See https://www.byte.nl/blog/magento-cacheleak-issue
# !!!! If you are a Hypernode customer, do not use this config as it will result in duplicate statements. !!!!!
user app;
worker_processes 4;
pid /var/run/nginx.pid;
events {
View mcd-study.md

Application initialization My video "Under the hood of Magento": http://www.youtube.com/watch?v=M10RR9acNE8 (watch in 1080p)

Front Controller These articles both cover in greater depth how the Front controller is initiated and how routers are selected. http://www.andreiboar.com/magento/magento-front-controller/ http://blog.belvg.com/magento-front-controller-pattern.html

URL rewrites These articles describe how url paths are formatted, where theyre located, and how theyre used by routers. As well as ... dun dun dunnn .. how the catalog url rewrite indexer works.

View folder-structure.md

Folder Structure

Please note

While this gist has been shared and followed for years, I regret not giving more background. It was originally a gist for the engineering org I was in, not a "general suggestion" for any React app.

Typically I avoid folders altogether. Heck, I even avoid new files. If I can build an app with one 2000 line file I will. New files and folders are a pain.

View initialize_properties.sublime-macro
[
{
"command": "escape"
},
{
"command": "expand_selection",
"args": {"to": "word"}
},
{
"command": "copy"
You can’t perform that action at this time.