Skip to content

Instantly share code, notes, and snippets.

View carcam's full-sized avatar

Carlos (carcam) carcam

View GitHub Profile
@carcam
carcam / gist:83456db4ec495dccafb9
Last active August 29, 2015 14:17
TESTING REGEXP for closing html tags
<?php
$mypattern = "([\w-.]+)+(:\d+)?(/([\w/_\-.]*(\?\S+)?)?)?(.*)?";
$pattern = '[a-zA-Z0-9&?_.,=%\-\/#]';
$url = "http://formaciononline.nccextremadura.org#formacion-desempleados";
$newurl = preg_replace('@(https?://'.$pattern.'*)@i', '<a href="$1">$1</a>', $url);
//echo "Old URL-> ".$url;
//echo "<br/>";
//echo "New URL -> ".htmlspecialchars($newurl);
[color]
status = auto
diff = auto
branch = auto
interactive = auto
ui = true
[alias]
amend = !"git commit --amend -C HEAD"
st = status
ci = commit
#!sh
# Filename: RestoreBackups.sh
# Description: This Shell script helps you restore multiple Joomla! site backups created with Akeeba Backup
# Author: Carlos Camara www.cmcamara.com
# License: GPL v2.0 or later
#################
# Configuration #
#################
#