Skip to content

Instantly share code, notes, and snippets.

View grafikchaos's full-sized avatar

Josh J. grafikchaos

View GitHub Profile
@grafikchaos
grafikchaos / Upgrading Magento via diff and patch.md
Last active December 18, 2015 04:38
Creating a diff file to upgrade Magento

Before you begin

Read Aaron Hawks' blog post for the original idea for this gist.

While this process should theoretically work to upgrade the core/default files that come with Magento from any old version to the most recent version (as long as they're in the same distribution, i.e., Community to Community or Enterprise to Enterprise), you should always refer to Magento's release notes and upgrade paths for the version you're upgrading to for full details and work flow. This is the process I used to go from Magento EE 1.12.0.2 to Magento EE 1.13.0.1 directly ( skipping over 1.13.0.0 due to the instructions outlined in this Magento article and release notes ).


Upgrade Pre-Requisites

Overview

This is the process I have found to be very helpful when migrating projects from their SVN repository over to Git. When migrating from one version control system to another it's important to retain as much information about the development history as possible (i.e., commit messages, tags, branches, etc.) and avoid the easy and tempting method of just downloading the project from a server and throw it into the new version control (you should only consider that if the project has never been in a version control system before).

Key concepts:

  • tools for migrating svn repositories to git
  • how to migrate standardized svn repositories
  • how to migrate non-standardized svn repositories
  • best practices for your now un-maintained SVN repository
@petemcw
petemcw / 01-SolrSetup.md
Last active January 18, 2020 03:45
Basic configuration steps for setting up Solr 3.x on CentOS/RHEL 6.4 -- specifically for use with Magento Enterprise

Installing Solr on CentOS/RHEL 6

From the Apache Software Foundation, "Solr is an open source enterprise search server based on the Lucene Java search library, with XML/HTTP and JSON, Ruby, and Python APIs, hit highlighting, faceted search, caching, replication, and a web administration interface." Magento has had built-in support for Solr since Enterprise verion 1.8.

The following instructions show how to complete a basic installation and configuration of Apache Solr for use with Magento Enterprise on CentOS/RHEL 6. These instructions the Java JDK with Tomcat rather than jetty.

Note: Solr should be on a dedicated server if possible, especially for large installations, as it can be resource intensive

Install Java JDK

@dustinsmith1024
dustinsmith1024 / bootstrap-fluid-grid-mixin.css
Last active December 12, 2015 08:09
A way to mixin fluid bootstrap grids
.fluid-row {
div, section, article, li { /* Needs testing on li's */
&:first-child { /* using first child and margin-left for IE support */
margin-left: 0;
}
}
}
.fluid-column(@columns: 1, @offset: 0, @reset: default) {
.input-block-level();
upstream myapp {
server unix:///myapp/tmp/puma.sock;
}
server {
listen 80;
server_name myapp.com;
# ~2 seconds is often enough for most folks to parse HTML/CSS and
# retrieve needed images/icons/frames, connections are cheap in
@petemcw
petemcw / gist:2719758
Created May 17, 2012 15:53
Commands to clean a Ubuntu install for smaller Vagrant packages
# Remove items used for building, since they aren't needed anymore
apt-get clean
apt-get -y remove linux-headers-$(uname -r) build-essential
apt-get -y autoremove
# Zero out the free space to save space in the final image:
dd if=/dev/zero of=/EMPTY bs=1M
rm -f /EMPTY
# Removing leftover leases and persistent rules
@olistik
olistik / gist:2627011
Last active August 12, 2021 06:39
Ubuntu 12.10 setup (rbenv/RVM, Janus, PostgreSQL)

Ubuntu 12.10 setup (rbenv/RVM, Janus, PostgreSQL)

Basic pre-requisites

  • Some utilities:
sudo apt-get install vim tmux git curl
  • Copy/paste from the command line:
@randym
randym / getting_barred.rb
Created April 24, 2012 23:16
Axlxs: Writing Excel With Ruby - Conditional Formatting
require 'axlsx'
p = Axlsx::Package.new
p.workbook do |wb|
# define your regular styles
styles = wb.styles
title = styles.add_style :sz => 15, :b => true, :u => true
default = styles.add_style :border => Axlsx::STYLE_THIN_BORDER
header = styles.add_style :bg_color => '00', :fg_color => 'FF', :b => true
money = styles.add_style :format_code => '#,###,##0', :border => Axlsx::STYLE_THIN_BORDER
percent = styles.add_style :num_fmt => Axlsx::NUM_FMT_PERCENT, :border => Axlsx::STYLE_THIN_BORDER
@watson
watson / ability.rb
Created October 5, 2011 09:50
Active Admin CanCan integration with shared front/backend User model and multi-level autherization
# app/models/ability.rb
# All front end users are authorized using this class
class Ability
include CanCan::Ability
def initialize(user)
user ||= User.new
can :read, :all
@grafikchaos
grafikchaos / php error reporting
Created June 30, 2011 21:19
PHP Error Reporting for local development and debugging
error_reporting(E_ALL);
ini_set('display_errors', TRUE);
ini_set('display_startup_errors', TRUE);