Skip to content

Instantly share code, notes, and snippets.

View kpicaza's full-sized avatar
💭
Every day coding ;-D

Koldo Picaza kpicaza

💭
Every day coding ;-D
View GitHub Profile
GRANT ALL PRIVILEGES
ON DATABASE_NAME.*
TO 'USER'@'%'
IDENTIFIED BY 'PASS';
Enable:
export XDEBUG_CONFIG="idekey=PHPSTORM"
Disable:
unset XDEBUG_CONFIG
angular.module('Audios').filter('orderObjectBy', function() {
return function(items, field, reverse) {
var filtered = [];
angular.forEach(items, function(item) {
filtered.push(item);
});
filtered.sort(function (a, b) {
return (a[field] > b[field] ? 1 : -1);
});
if(reverse) filtered.reverse();
@kpicaza
kpicaza / gist:c81460866a4e629def4f
Created February 23, 2016 21:01
Symfony permissions fedora 23
HTTPDUSER=`ps axo user,comm | grep -E '[a]pache|[h]ttpd|[_]www|[w]ww-data|[n]ginx' | grep -v root | head -1 | cut -d\ -f1`
sudo setfacl -R -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX var
sudo setfacl -dR -m u:"$HTTPDUSER":rwX -m u:`whoami`:rwX var
@kpicaza
kpicaza / gist:0abdd7ecd6203ae4e503
Created February 23, 2016 10:04
Rever last commit remotely
git push origin +[commit hash]:master