Skip to content

Instantly share code, notes, and snippets.

View aleron75's full-sized avatar

Alessandro Ronchi aleron75

View GitHub Profile
@markshust
markshust / data-install-0.0.0.1.php
Created July 9, 2015 12:39
update magento static block programmatically through upgrade scripts
<?php
/* @var $installer Mage_Core_Model_Resource_Setup */
$installer = $this;
$installer->startSetup();
$connection = $installer->getConnection();
$identifier = 'id-goes-here';
$title = 'Title Goes Here';
@JeffBelback
JeffBelback / docker-destroy-all.sh
Last active December 12, 2023 17:47
Destroy all Docker Containers and Images
#!/bin/bash
# Stop all containers
containers=`docker ps -a -q`
if [ -n "$containers" ] ; then
docker stop $containers
fi
# Delete all containers
containers=`docker ps -a -q`
if [ -n "$containers" ]; then
docker rm -f -v $containers
@imjasonh
imjasonh / markdown.css
Last active February 12, 2024 17:18
Render Markdown as unrendered Markdown (see http://jsbin.com/huwosomawo)
* {
font-size: 12pt;
font-family: monospace;
font-weight: normal;
font-style: normal;
text-decoration: none;
color: black;
cursor: default;
}
@kalenjordan
kalenjordan / safer-magento-registration-emails.md
Created March 26, 2015 15:17
Safer Magento Registration Emails

Safer Magento Registration Emails

This is a little idea for a module maybe for a hackathon or something. Magento includes passwords in plain text in registration emails by default. In some cases you can just suppress the password, but in other cases you can't - for example if you have customer service reps creating accounts over the phone that need to generate password and send them to customers.

So - how about integrating with readthenburn.com to send email passwords, or perhaps generating temporary password that expire after a day or two, requiring them to use the forgot password if they didn't login by that time.

@avoelkl
avoelkl / magestackday.md
Last active June 18, 2016 15:54
MageStackDay little helpers

MageStackDay notes & queries

Some notes from the MageStackDay chat:

  • save your votes. Marius can close unlimited nrs of questions so he'll do that, just vote / flag once is enough!
  • If you can clean up the spelling and grammar on the question, feel free to do so, as it would be easier for non-english speakers
  • use your votes

Queries

Questions to work on

@wsakaren
wsakaren / magento2_install
Last active August 29, 2015 14:11
Installing Magento2 - The quick way
So we all hate reading docs. Here is the quick setup for installing Magento2. If you want the long route - http://devdocs.magento.com/
I'm assuming you have composer, PHP 5.4+ and MySQL5.6+. If you have MAMP installed time to go sort that as it wont work (MAMP is on MySQL5.5.x).
1. Install Composer - curl -sS https://getcomposer.org/installer | php
2. mv composer.phar /usr/local/bin/composer (might need to sudo)
3. Goto base httpdocs directory
4. git clone git@github.com:magento/magento2.git
5. Set permissions (like you do in Magento 1.x)
6. cd magento2
@jm42
jm42 / c.php
Created October 31, 2014 04:31
IoC in a tweet
<?php // php -dallow_url_include=1 c.php
// Compressed 122 bytes
// class C extends ArrayObject { function __get($i) { $s = $this[$i]; $s instanceof Closure && $s = $s($this); return $s; } }
class C extends ArrayObject {
function __get($i) {
$s = $this[$i];
$s instanceof Closure && $s = $s($this);
return $s;
@jm42
jm42 / 140.md
Last active December 24, 2019 14:54
140 bytes of PHP code

140 bytes

  • Framework

    • Twitto - A web framework in a tweet.
    • Kernel - A kernel in a tweet.
    • sized140 - Something like a framework in PHP with 6 components of 140 chars.
  • Router

  • mu - A tweet-sized PHP micro-router.
@xsist10
xsist10 / Dispatch1.php
Last active January 21, 2017 17:28
An event dispatcher in a tweet
<?php
// Version 1
// Minified
// class Dispatch{function add($e,$l){$this->l[$e][]=$l;}function trigger($e,$d){foreach ($this->l[$e] as $l)call_user_func_array($l, $d);}}
class Dispatch{
function add($e, $l) {
$this->l[$e][] = $l;
@renttek
renttek / 0001-BUGIFX-Magento-Zend-Framework-1-PHP5.6.patch
Last active July 5, 2021 17:42
Bugfix for Zend Framework 1 in Magento (>= 1.7.*.*) + PHP 5.6
From 473846959772d8160b34b92ae3bcecddf24b972f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Julian=20Nu=C3=9F?= <julian.nuss@outlook.com>
Date: Tue, 23 Sep 2014 21:07:29 +0200
Subject: [PATCH 1/1] [BUGIFX] Zend Framework 1 + PHP5.6
---
lib/Zend/Locale/Format.php | 22 +++++++++++-----------
lib/Zend/Service/Audioscrobbler.php | 6 +++---
lib/Zend/Service/Technorati.php | 6 +++---
lib/Zend/Validate/Hostname.php | 4 ++--