Skip to content

Instantly share code, notes, and snippets.

View iBet7o's full-sized avatar
🏠
Working from home

iBet7o iBet7o

🏠
Working from home
View GitHub Profile
@iBet7o
iBet7o / gist:14d9059a47bf4e9e2e3c
Last active August 29, 2015 14:03
Eliminar elementos vacíos de un arreglo con PHP

Función para eliminar los elementos vacíos de un arreglo, en PHP, soporta arreglos anidados.

La función:

function removeEmptyElements(&$element)
{
    if (is_array($element)) {
        if ($key = key($element)) {
            $element[$key] = array_filter($element);
@iBet7o
iBet7o / gist:2d0921d0dc144bd5e73d
Created July 8, 2014 23:19
Cambiar la zona horaria en servidores CentOS

Las zonas horarias disponibles se encuentran en la ruta

/usr/share/zoneinfo

Para la ciudad de México la ruta es America/Mexico_City

Abrir el archivo clock y cambiar el valor de la variable ZONE por el indicado, en mi caso quedaría ZONE="America/Mexico_City"