Skip to content

Instantly share code, notes, and snippets.

View jahvi's full-sized avatar
👨‍💻
Deep in the code

Javier Villanueva jahvi

👨‍💻
Deep in the code
View GitHub Profile

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.

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.

[
{
"command": "escape"
},
{
"command": "expand_selection",
"args": {"to": "word"}
},
{
"command": "copy"
@antoinekociuba
antoinekociuba / tar_magento_media_folder.sh
Created August 3, 2014 12:57
Command to Tar Magento media folder, excluding unwanted files/folders. This command needs to be run on your magento installation root folder.
tar -zcvf var/backups/media_$(date +%d%m%Y).tar.gz --exclude-vcs --exclude='*cache*' --exclude='captcha' --exclude='wysiwyg/.thumbs' --exclude='tmp' --exclude='import' --exclude='export' --exclude='js' --exclude='js_secure' --exclude='css' --exclude='css_secure' media/
@adampmoss
adampmoss / local.xml
Last active April 3, 2018 22:41
Magento local.xml Boilerplate
<?xml version="1.0" encoding="UTF-8"?>
<layout>
<!-- ############# GLOBAL LAYOUT UPDATES ############# -->
<default>
<!-- Remove unwanted blocks entirely
<remove name="right.poll"/>
<remove name="right.permanent.callout"/>
<?php
class BaseController extends Controller {
private $application_name = 'The Cool Kid';
protected $layout = 'base';
// The cool kids' way of handling page titles.
protected $title = array(
'parent' => '',
'seperator' => '::',
@akuzemchak
akuzemchak / l4project.sh
Last active November 16, 2023 08:48
New L4 project with clean history
# Initial setup
git clone -o framework -b develop https://github.com/laravel/laravel.git project-name
cd project-name
git checkout --orphan master
git commit -m "Initial commit"
# Pulling changes
git fetch framework
git merge --squash -m "Upgrade Laravel" framework/develop
# Fix merge conflicts if any and commit
@KartikTalwar
KartikTalwar / Documentation.md
Last active April 13, 2024 23:09
Rsync over SSH - (40MB/s over 1GB NICs)

The fastest remote directory rsync over ssh archival I can muster (40MB/s over 1gb NICs)

This creates an archive that does the following:

rsync (Everyone seems to like -z, but it is much slower for me)

  • a: archive mode - rescursive, preserves owner, preserves permissions, preserves modification times, preserves group, copies symlinks as symlinks, preserves device files.
  • H: preserves hard-links
  • A: preserves ACLs
@kasparsd
kasparsd / wordpress-plugin-svn-to-git.md
Last active April 17, 2024 12:35
Using Git with Subversion Mirroring for WordPress Plugin Development
@ArnaudLigny
ArnaudLigny / Narno_Mage_Extension.php
Last active February 27, 2017 11:50
Get download link of a Magento extension from MagentoConnect key.
<?php
/**
* Get download link of a Magento extension from MagentoConnect key
*
* Dependencies: Zend_Http_Client, Zend_Uri (Zend Framework)
*/
class Narno_Mage_Extension
{
protected $_key = null;