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
@neophyt3
neophyt3 / Session.php
Last active August 29, 2015 14:19 — forked from mpratt/Session.php
<?php
/**
* Session.php
*
* @package Bolido
* @author Michael Pratt <pratt@hablarmierda.net>
* @link http://www.michael-pratt.com/
* @license MIT
*/
<?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 / 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).

@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));
http://www.ics.uci.edu/~eppstein/PADS
@neophyt3
neophyt3 / .gitignore
Created April 26, 2016 17:18 — forked from christianchristensen/.gitignore
Simple PHP Graph data-structure.
/vendor
FFMPEG Tutorial
http://dranger.com/ffmpeg/end.html
@neophyt3
neophyt3 / ngrxintro.md
Created July 31, 2016 18:25 — forked from btroncone/ngrxintro.md
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

#Comprehensive Introduction to @ngrx/store By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

@neophyt3
neophyt3 / building-static-nginx.txt
Created December 28, 2016 20:15 — forked from rjeczalik/building-static-nginx.txt
Notes on building nginx as a static binary.
# Building static nginx for teh lulz
#
# basic dependencies
sudo apt-get install libxslt1-dev libxml2-dev zlib1g-dev libpcre3-dev libbz2-dev libssl-dev
# download nginx and openssl
wget http://nginx.org/download/nginx-1.5.6.tar.gz
tar xf nginx-1.5.6.tar.gz; cd nginx-1.5.6
@neophyt3
neophyt3 / ps-aux.sh
Created January 12, 2017 21:13
Linux Top Command
#!/bin/sh
#Src: https://www.linode.com/docs/databases/mysql/tuning-your-mysql-database
echo [PID] [MEM] [PATH] && ps aux | awk '{print $2, $4, $11}' | sort -k2rn | head -n 20
ps -eo pcpu,pid,user,args | sort -k 1 -r | head -20