Skip to content

Instantly share code, notes, and snippets.

View nzajt's full-sized avatar

nate daily nzajt

View GitHub Profile
@nzajt
nzajt / gist:cfe7c5514ed662adda4b
Last active February 2, 2016 08:35
Magento on osx Mavricks with nginx, php-fmp

#Magento on osx Mavricks with nginx, php-fmp

##Step 1

###Make sure that brew is up to date and installed.

If you do not have home brew installed, go to the link below and install it.

@nzajt
nzajt / nginx.conf
Last active August 29, 2015 14:03
nginx.conf for osx
worker_processes 4;
events {
worker_connections 1024;
multi_accept on;
}
http {
default_type application/octet-stream;
include /usr/local/etc/nginx/mime.types;
@nzajt
nzajt / magenot-host.conf
Created July 2, 2014 22:03
Magento Nginx host file
server {
listen 80 default;
listen 443 ssl;
ssl_certificate PATHTOSSL.crt;
ssl_certificate_key PATHTOSSL.key;
server_name www.SITEURL.com *.SITEURL.com; ## Domain is here twice so server_name_in_redirect will favour the www
root PATH TO MAGENTO ROOT;
autoindex off;
echo "Started"
brew tap homebrew/dupes
brew tap homebrew/versions
brew tap homebrew/homebrew-php
brew update
brew install --without-apache --with-fpm --with-mysql --whith-mcrypt php55
brew install nginx mariadb
echo "done"
@nzajt
nzajt / speed_test_two_fer.rb
Last active August 20, 2018 23:21
Testing if a module or class is faster when only using one method. requires gem 'benchmark-ips' from https://github.com/evanphx/benchmark-ips
require 'benchmark/ips'
# test for modules
module TwoFer
# Takes name or no name and returns statement
def self.two_fer(name = 'you')
"One for #{name}, one for me."
end
end