Skip to content

Instantly share code, notes, and snippets.

View tegansnyder's full-sized avatar
💭
Stay'n cold in Minnesota

Tegan Snyder tegansnyder

💭
Stay'n cold in Minnesota
View GitHub Profile
@colinmollenhour
colinmollenhour / buildhtaccess.sh
Created June 30, 2010 22:42
.htaccess combiner
#!/bin/bash
# Author: Colin Mollenhour
#
# Usage: Run from the webroot, .htaccess-combined will be created.
dest='.htaccess-combined'
pwd=`pwd`
echo -n "" > $dest
while read -r file; do
loc=`dirname $file`
@eThikas
eThikas / tcpick-mac-install.sh
Created February 27, 2012 00:55
Get TCPICK working on mac
#!/bin/bash
mkdir temp
cd temp
wget http://downloads.sourceforge.net/project/tcpick/tcpick/0.2.1/tcpick-0.2.1.tar.gz
tar zxvf tcpick-0.2.1.tar.gz
cd tcpick-0.2.1
CFLAGS="-m32" ./configure
echo "char *lookup();" >> src/lookup.h
make
sudo make install
@fstrube
fstrube / git-copyright
Created May 16, 2012 16:19
Stage all files that have only copyright changes for commit (git)
@Vinai
Vinai / fix-url-keys.php
Last active September 2, 2022 16:24
This fixes the duplicate url_key issue in a Magento 1.8 / 1.13 installation.
<?php
/**
* Drop this into the shell directory in the Magento root and run with -h to see all options.
*/
require_once 'abstract.php';
/**
* Fix duplicate url keys for categories and products to work with the 1.8 alpha1 CE url key constraints.
@davidalger
davidalger / Magento_CE_1.7.0.2_v1-CSRF_Patch.diff
Created July 6, 2013 03:50
For details on this, please refer to this post on Magento SE: http://magento.stackexchange.com/a/3332/128 — DISCLAIMER: I have NOT TESTED this patch. The patch provided here is provided with NO WARRANTY and may or may not fully resolve the vulnerabilities referenced in the CE 1.8 release notes. As an untested patch, there is also no guarantee th…
Date: Fri, 5 Jul 2013 22:41:03 -0500
Subject: [PATCH] Magento_CE_1.7.0.2_v1-CSRF_Patch
---
.../core/Mage/Catalog/Block/Product/Abstract.php | 85 ++++-
app/code/core/Mage/Catalog/Block/Product/View.php | 10 +-
.../core/Mage/Catalog/Helper/Product/Compare.php | 28 +-
app/code/core/Mage/Checkout/Helper/Cart.php | 26 +-
.../Mage/Checkout/controllers/CartController.php | 69 ++--
.../Checkout/controllers/OnepageController.php | 70 +++-
@IvanChepurnyi
IvanChepurnyi / Table.php
Last active July 11, 2022 10:44
Optimized options load
<?php
/**
* Optimized version of attribute source options model
*
* That allows to preload options once and reuse them instead of doing calls to db all the time
*
*/
class EcomDev_Optimization_Model_Resource_Attribute_Source_Table
extends Mage_Eav_Model_Entity_Attribute_Source_Table
@jbenet
jbenet / simple-git-branching-model.md
Last active April 9, 2024 03:31
a simple git branching model

a simple git branching model (written in 2013)

This is a very simple git workflow. It (and variants) is in use by many people. I settled on it after using it very effectively at Athena. GitHub does something similar; Zach Holman mentioned it in this talk.

Update: Woah, thanks for all the attention. Didn't expect this simple rant to get popular.

@IvanChepurnyi
IvanChepurnyi / vhost.conf
Created September 27, 2013 23:47
This simple rewrite will help you to run phpunit from PHPStorm in Vagrant box without patching php.jar
location ~ ^/_intellij_phpunit_launcher.php$ {
expires off; ## Do not cache dynamic content
set $args "$args&dir=$document_root&config=phpunit.xml.dist";
fastcgi_pass unix://var/run/php5-fpm.sock; # Replace with your fpm pass
fastcgi_read_timeout 600;
include fastcgi_params; ## See /etc/nginx/fastcgi_params
}
@kalenjordan
kalenjordan / mass-copyright-replace.sh
Last active December 24, 2015 07:49
Change copyright from 2013 to 2012
@peterjaap
peterjaap / convertImages.sh
Last active May 11, 2020 08:28
Convert images to smaller size and lower quality to reduce file sizes for Magento's original product photos
#!/bin/bash
# convertImages.sh
# Author: Peter Jaap Blaakmeer (elgentos.nl)
# https://gist.github.com/peterjaap/7080989
NEWQUALITY=80
NEWSIZE=1000
DIRECTORY=media/catalog/product/
du -hs $DIRECTORY