Skip to content

Instantly share code, notes, and snippets.

View magicento's full-sized avatar

Electrical Business Solutions magicento

View GitHub Profile
@magicento
magicento / magento-1-nginx.md
Created February 23, 2022 03:33 — forked from Knase/magento-1-nginx.md
Magento 1 nginx configuration
server { 
	listen 80; 
	root /Users/admin/htdocs/vax-uk;
	index index.php index.html index.htm;
	 
	server_name vax.local; 
	access_log /usr/local/etc/nginx/logs/vax_access.log;
	access_log /usr/local/etc/nginx/logs/vax_error.log;
	 
@magicento
magicento / magento.md
Created May 31, 2016 03:56 — forked from manojiksula/magento.md
Magento Code Snippet

Common

Magento : Get Base Url , Skin Url , Media Url , Js Url , Store Url and Current Url

Get Url in phtml files

  1. Get Base Url :
	Mage::getBaseUrl();
@magicento
magicento / varnish-install.sh
Created May 28, 2016 13:58 — forked from atouchard/varnish-install.sh
Install Varnish on MacOSX via Homebrew
#!/bin/sh
#
# Install Varnish via Homebrew
#
# You need to add /usr/local/sbin in your PATH
# vcl files are in /usr/local/etc/varnish
#
# Usage :
@magicento
magicento / README.md
Last active August 29, 2015 14:23 — forked from lovasoa/README.md

Array intersect

Fastest function to intersect a large number of big arrays in javascript, without dependencies

  • The compressed version is only 345 caracters long.
  • Faster than common libraries, even a large number of arrays, or on very big arrays. (See benchmarks)

Usage

require 'formula'
class MemcachePhp < Formula
url 'http://pecl.php.net/get/memcache-3.0.6.tgz'
homepage 'http://pecl.php.net/package/memcache'
sha1 'eb0c922df3f5ca459bcce85e141f379d3b490ca7'
def install
Dir.chdir "memcache-#{version}" do
# See https://github.com/mxcl/homebrew/pull/5947
@magicento
magicento / index.js
Last active August 29, 2015 14:13 — forked from edokeh/index.js
//
// _oo0oo_
// o8888888o
// 88" . "88
// (| -_- |)
// 0\ = /0
// ___/`---'\___
// .' \\| |// '.
// / \\||| : |||// \
// / _||||| -:- |||||- \