Skip to content

Instantly share code, notes, and snippets.

@mwin007
mwin007 / 0_reuse_code.js
Created July 3, 2014 18:38
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@mwin007
mwin007 / 0_reuse_code.js
Last active August 29, 2015 14:13
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@mwin007
mwin007 / fiddle.response.json
Created October 19, 2015 00:11 — forked from szilardhuber/fiddle.response.json
Rect and Angular
{"id":708083,"data":[[800,"0001","0100000000",1995,1,"","","","","40","S","","","","S","","","","","6.14","12.00","0.00","6.14","EUR","0.00","0.00","0.00","0.00","0.00","0.00","0.00","0.00","","","",0,"","0.00","0.00000","0.00","0.00","0.00","19950606","19950606","","","","","","RFBU","","","0.00","",0,"","","","","","",0,0,"","","","",0,"","","X","","","","","","","","","","","","","","","","","0000100000","","","","X","","","","",0,0,0,"0.000","0.000","0.00","0.00","0.00","","","","","","0.00","","0.00","0.00","","0.00","0.00","","0.00","0.00","",0,0,"","","","","","",0,0,"","","",0,0,"","",0,"","","0.00","","0.00","","","",0,"","","","","0.00","","0.00","0.00","0.00","0.00","","","0.000","","0.000","","0.000","","",0,0,"","",0,"","","","0.00","0.00","0.00","0.00","","0.00","","","","","","","","","","","","",0,"0.00","0.00","","","","","","","","","","","","","","0.000000","","","","0",0,"0","0",0,"","","","","",0,"","6.14","7.37","0.00","0.00","0.00","0.00","0.00","0.00","0.00","0.00","0.00","0.00","0.00"
@mwin007
mwin007 / gist:7296cb7f637e4fcd4306
Created November 1, 2015 18:09 — forked from tonyoconnell/gist:2351492
Install Magento 1.8 With Sample Data By SSH
mkdir demo
cd demo
wget http://www.magentocommerce.com/downloads/assets/1.8.1.0/magento-1.8.1.0.tar.gz
wget http://www.magentocommerce.com/downloads/assets/1.6.1.0/magento-sample-data-1.6.1.0.tar.gz
tar -zxvf magento-1.8.1.0.tar.gz
tar -zxvf magento-sample-data-1.6.1.0.tar.gz
mv magento-sample-data-1.6.1.0/media/* magento/media/
mv magento-sample-data-1.6.1.0/magento_sample_data_for_1.6.1.0.sql magento/data.sql
mv magento/* magento/.htaccess .
chmod o+w var var/.htaccess app/etc
@mwin007
mwin007 / angular-pagination.html
Created November 10, 2015 03:31 — forked from masudcsesust04/angular-pagination.html
Pagination with AngularJS for Typekit API
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>Pagination with AngularJS - jsFiddle demo</title>
<script type='text/javascript' src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script type='text/javascript' src='https://ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular.js'></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular-sanitize.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.2/angular-resource.js"></script>
<link rel="stylesheet" type="text/css" href="/css/result-light.css">

##php[world] Tutorial Attendee Guide ###Scaling Magento - Reaching Peak Performance

####When / Where Monday, November 17th 9:00AM-12:30PM Ash Grove B

####General Overview We will be talking about clustering Magento and using Vagrant with Digital Ocean to back the tutorial. Vagrant and

@mwin007
mwin007 / magento-nginx.conf
Created December 9, 2015 02:20 — forked from gwillem/magento-nginx.conf
Battle-tested Nginx configuration for Magento (source: www.hypernode.com)
# This is an annotated subset of the Nginx configuration from our Magento production platform @ www.hypernode.com
# See https://www.byte.nl/blog/magento-cacheleak-issue
user app;
worker_processes 4;
pid /var/run/nginx.pid;
events {
worker_connections 768;
}
@mwin007
mwin007 / .htaccess
Created December 18, 2015 15:02
CI: Simple .htaccess using mod_rewrite for CodeIgniter
<IfModule mod_rewrite.c>
RewriteEngine On
# !IMPORTANT! Set your RewriteBase here and don't forget trailing and leading
# slashes.
# If your page resides at
# http://www.example.com/mypage/test1
# then use
# RewriteBase /mypage/test1/
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
@mwin007
mwin007 / Observer.php
Created July 1, 2016 20:48 — forked from IvanChepurnyi/Observer.php
Optimized catalog price rules
<?php
class EcomDev_Optimization_Model_Rule_Observer extends Mage_CatalogRule_Model_Observer
{
protected $_preloadedPrices = array();
public function beforeCollectTotals(Varien_Event_Observer $observer)
{
$quote = $observer->getQuote();
$date = Mage::app()->getLocale()->storeTimeStamp($quote->getStoreId());