Skip to content

Instantly share code, notes, and snippets.

View maurotdo's full-sized avatar

Mauro Maggi maurotdo

  • PHP dev @ Immobiliare.it
  • Rome
View GitHub Profile
@maurotdo
maurotdo / pf
Last active August 29, 2015 14:25
Port forwarding verso un Docker container
Scenario: OSX, un servizio in ascolto su di un container docker
Avviare il container docker esponendo le porte
$ docker run -d -P memcached
Abilitare il packet forwarding
$ sysctl -w net.inet.ip.forwarding=1
@maurotdo
maurotdo / gog-spring-2014-final-round
Last active August 29, 2015 14:01
GOG Spring Insomniac Final Round
NOW SELLING:
Tiny and Big: Grandpa's Leftovers
TO GO:
Alan Wake's American Nightmare
Betrayal at Krondor Pack
Edna & Harvey: Harvey's New Eyes
FTL: Advanced Edition
@maurotdo
maurotdo / xdebug.sh
Created March 7, 2014 16:44
Simple bash script to turn on & off Xdebug extension Based on Ubuntu 13.10 php5-xdebug extension
#!/bin/bash
#
# Script to turn xdebug on and off
# Permission to copy and modify is granted under the MIT license
# Last revised 2014-03-07
# Mauro Maggi <maurotdo (at) gmail (dot) com>
PHP=$(which php)
XDEBUG=$($PHP -i | grep -i xdebug | grep -i enabled)
INI=$($PHP -i | grep "xdebug.ini")
@maurotdo
maurotdo / gist:6578585
Created September 16, 2013 09:41
js FormData
/* form submit*/
$(function() {
$("form").first().submit(function(e) {
e.preventDefault();
var form = $(this);
if (form) {
var url = form.attr("action");
var formData = new FormData(document.forms[0]);
$.ajax({
url: url,
@maurotdo
maurotdo / xdebug.sh
Created May 23, 2013 11:32
Simple bash script to turn on & off Xdebug extension Based on homebrewed php-xdebug extension
#!/bin/bash
#
# Script to turn xdebug on and off
# Permission to copy and modify is granted under the MIT license
# Last revised 2013-05-23
# Mauro Maggi <maurotdo (at) gmail (dot) com>
PHP=$(which php)
BREW=$(which brew)
XDEBUG=$($PHP -i | grep -i xdebug | grep -i enabled)