Skip to content

Instantly share code, notes, and snippets.

View federivo's full-sized avatar

Federico Rivollier federivo

View GitHub Profile
@Vinai
Vinai / magento-composer-issues.md
Last active April 15, 2020 03:09
My beef with composer and Magento
@ProcessEight
ProcessEight / Testing in Magento 2.md
Last active May 23, 2024 16:55
M2: Notes on setting up PHPUnit and writing/troubleshooting tests in Magento 2
# MAC manipulators
alias random_mac='sudo ifconfig en0 ether `openssl rand -hex 6 | sed "s/\(..\)/\1:/g; s/.$//"`'
alias restore_mac='sudo ifconfig en0 ether YOUR_ORIGINAL_MAC_ADDRESS_GOES_HERE'
@addyosmani
addyosmani / backboneglobalpubsub.md
Created February 4, 2012 19:37
Backbone.js global pub/sub

Generally one implements notifications by listening for events on specific models but if one wishes to have a single global message interchange, it could be done as follows:

var pubsub = new Backbone.Model;

View1 = Backbone.View.extend({
  initialize: function(){
    pubsub.bind('custom event', callback);
  }
 // ...