Skip to content

Instantly share code, notes, and snippets.

Deep in the code

Javier Villanueva jahvi

Deep in the code
View GitHub Profile
peterjaap /
Last active Dec 16, 2020
Tailwind font-weights check

Tailwind font-weights check

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

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" > /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 / my.cnf
Last active Dec 11, 2020
MySQL Magento Config
View my.cnf
## 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 / .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 / 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
* @category Namespace
* @package Namespace_Module
* @author Anna Völkl
* @author Christoph Aßmann
* @author Fabian Schmengler
/** @var Mage_Core_Model_Resource_Setup $installer */
mroffice / SUPEE 6788 patch for Magento Community
Last active Jul 1, 2020
How I patched our Magento CE with the notorious SUPEE 6788 patch that breaks all your extensions.
View SUPEE 6788 patch for Magento Community

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 / magento-nginx.conf
Last active Dec 22, 2020
Battle-tested Nginx configuration for Magento (source:
View magento-nginx.conf
# This is an annotated subset of the Nginx configuration from our Magento production platform @
# See
# !!!! 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/;
events {

Application initialization My video "Under the hood of Magento": (watch in 1080p)

Front Controller These articles both cover in greater depth how the Front controller is initiated and how routers are selected.

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.


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.