Skip to content

Instantly share code, notes, and snippets.

View etessari's full-sized avatar

Enrico Tessari etessari

View GitHub Profile
@etessari
etessari / docker-setup.md
Last active August 26, 2021 12:50
Docker setup local development, running nginx and mysql as separate container

Instructions docker local development setup. Open your favorite Terminal and run these commands.

docker create devbox network

$ docker network create devbox
$ docker network create mysql

docker mysql

@etessari
etessari / convert date to a specific UTC
Created March 21, 2016 16:58
convert date to a specific UTC
protected function _convertDate($date, $from_utc = 'UTC', $to_utc = 'Europe/Berlin') {
$to_date = DateTime::createFromFormat(
'Y-m-d H:i:s',
$date,
new DateTimeZone($from_utc)
);
$to_date->setTimeZone(new DateTimeZone($to_utc));
return $to_date->format('Y-m-d H:i:s');
}
@etessari
etessari / magento_admin_password.txt
Last active March 16, 2016 15:52
Change magento backend admin user password
// user: admin, password: qwerty1
UPDATE admin_user SET password=CONCAT(MD5('qXqwerty1'), ':qX') WHERE username='admin';