Skip to content

Instantly share code, notes, and snippets.

View neophyt3's full-sized avatar
🎯
Focusing

Pradeep Chauhan neophyt3

🎯
Focusing
  • Mumbai, India
View GitHub Profile
http://www.ics.uci.edu/~eppstein/PADS
@neophyt3
neophyt3 / gulpfile.js
Created December 27, 2015 17:46 — forked from danharper/gulpfile.js
New ES6 project with Babel, Browserify & Gulp
var gulp = require('gulp');
var sourcemaps = require('gulp-sourcemaps');
var source = require('vinyl-source-stream');
var buffer = require('vinyl-buffer');
var browserify = require('browserify');
var watchify = require('watchify');
var babel = require('babelify');
function compile(watch) {
var bundler = watchify(browserify('./src/index.js', { debug: true }).transform(babel));
@neophyt3
neophyt3 / Magento - Add Custom Structure Blocks.md
Created December 20, 2015 18:38 — forked from grafikchaos/Magento - Add Custom Structure Blocks.md
HowTo: Add Custom Structural Blocks to a Layout

Overview

Recently had a client that wanted to customize the layout for a category landing page so that the category's title and description would be displayed above the layered navigation and product grid — essentially creating a full-width section above the left sidebar and main content areas.

NOTE: For reference, this is based off the blog post from Collaboration133.com's Magento - Add Custom Structural Block Reference.

Custom Module (My_LayoutMods)

I created a custom module to help organize and identify that there are some custom modifications to layout templates. Not saying you have to, but it may be easier for other's (or your future self) to recognize and find what customizations were done (and hopefully why).

<?php
class PseudoCrypt {
/* Key: Next prime greater than 62 ^ n / 1.618033988749894848 */
/* Value: modular multiplicative inverse */
private static $golden_primes = array(
'1' => '1',
'41' => '59',
'2377' => '1677',
@neophyt3
neophyt3 / Session.php
Last active August 29, 2015 14:19 — forked from mpratt/Session.php
<?php
/**
* Session.php
*
* @package Bolido
* @author Michael Pratt <[email protected]>
* @link http://www.michael-pratt.com/
* @license MIT
*/