Skip to content

Instantly share code, notes, and snippets.


Eyal Gantz egantz

Block or report user

Report or block egantz

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
egantz / wp-config.php
Created Feb 5, 2019 — forked from ifamily/wp-config.php
A universal WordPress wp-config.php which works on local development to staging and production server environments.
View wp-config.php
One wp-config for local development to staging to production.
// Define Environments
$environments = array(

Keybase proof

I hereby claim:

  • I am egantz on github.
  • I am egantz ( on keybase.
  • I have a public key whose fingerprint is 1F9E 6406 6D00 892F 51AD 3A4D 6FD6 D311 42CB A8E1

To claim this, I am signing this object:

egantz /
Created May 12, 2018 — forked from GhazanfarMir/
Install PHP7.2 NGINX and PHP7.2-FPM on Ubuntu 16.04
########## Install NGINX ##############
# Install software-properties-common package to give us add-apt-repository package
sudo apt-get install -y software-properties-common
# Install latest nginx version from community maintained ppa
sudo add-apt-repository ppa:nginx/stable
# Update packages after adding ppa
egantz / string-to-slug.js
Created Dec 24, 2017 — forked from spyesx/string-to-slug.js
String to slug in JS (wordpress sanitize_title)
View string-to-slug.js
var string_to_slug = function (str)
str = str.replace(/^\s+|\s+$/g, ''); // trim
str = str.toLowerCase();
// remove accents, swap ñ for n, etc
var from = "àáäâèéëêìíïîòóöôùúüûñç·/_,:;";
var to = "aaaaeeeeiiiioooouuuunc------";
for (var i=0, l=from.length ; i<l ; i++)
egantz /
Created Oct 7, 2017 — forked from Pablosan/
A bash script that will set up a new EC2 instance and ssh into it.
# Authorize TCP, SSH & ICMP for default Security Group
#ec2-authorize default -P icmp -t -1:-1 -s
#ec2-authorize default -P tcp -p 22 -s
# The Static IP Address for this instance:
IP_ADDRESS=$(cat ~/.ec2/ip_address)
# Create new t1.micro instance using ami-cef405a7 (64 bit Ubuntu Server 10.10 Maverick Meerkat)
egantz /
Created Aug 30, 2017 — forked from bsodmike/
HOWTO: Setup mail forwarding with Sendmail in Ubuntu 10.04 LTS

Copyright (c) 2011, Michael de Silva ( Blog: ~ Twitter: @bsodmike

Fix: 'config error: mail loops back to me (MX problem?)'

To prevent receiving config error: mail loops back to me (MX problem?) errors, you need to add each virtualdomain.tld to the /etc/mail/local-host-names file and re-compile your sendmail config via make.

You have asked mail to a domain (e.g., to be forwarded to a specific host (in this case, by using an MX record, but the relay machine doesn't recognise itself as Add to /etc/mail/local-host-names [known as /etc/ prior to version 8.10] (if you are using FEATURE(`use_cw_file')) or add "Cw" to your configuration file.


egantz / gist:71235115093ae2789f75e500895fd138
Created Aug 13, 2017 — forked from adamstac/gist:7462202
Install and configure Sendmail on Ubuntu
View gist:71235115093ae2789f75e500895fd138

Install and configure Sendmail on Ubuntu

This should help you get Sendmail installed with basic configuration on Ubuntu.

  1. If sendmail isn't installed, install it: sudo apt-get install sendmail
  2. Configure /etc/hosts file: nano /etc/hosts
  3. Make sure the line looks like this: localhost yourhostname
  4. Run Sendmail's config and answer 'Y' to everything: sudo sendmailconfig
  5. Restart apache sudo service apache2 restart
View migrateorders.php
// Copies woocommerce orders and users over from source to target.
// I use this on my local machine - loading both db's up there side by side
// could easily adjust the connect strings to connect elsewhere if needed.
// will change order ids
// My use case for this is when I've got a staging/test version of a site with new posts/products/pages etc, that needs
// to go live without the loss of any orders placed on the site site since we copied it to the staging site.
egantz / nginx.conf
Created Nov 15, 2016 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here
View nginx.conf
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
egantz / 0_reuse_code.js
Created Dec 25, 2015
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
You can’t perform that action at this time.