Skip to content

Instantly share code, notes, and snippets.

Avatar

Pedro Cifuentes pedrocifuentes

View GitHub Profile
View gist:6e993b1125be14a105801e628e75f4f9
echo | openssl s_client -servername 54.72.84.XXX -connect www.sysled.es:443 2>/dev/null | openssl x509 -noout -dates
### source https://www.shellhacks.com/openssl-check-ssl-certificate-expiration-date/
View mysqlShowTablesSize.sql
SELECT table_name AS "Tables",
round(((data_length + index_length) / 1024 / 1024), 2) "Size in MB"
FROM information_schema.TABLES
WHERE table_schema = "$DB_NAME"
ORDER BY (data_length + index_length) DESC;
@pedrocifuentes
pedrocifuentes / gist:1f2b91fcb80a93bbee81
Created Jul 14, 2015
Download full web with dependencies
View gist:1f2b91fcb80a93bbee81
wget --page-requisites -v --convert-links http://**.com/clientes/sysled/index.html
View Graphic Git log filtered by user
git log --author=Yoel --since=6.weeks --pretty=format:'%C(yellow)%h|%Cred%ad|%Cblue%an|%Cgreen%d %Creset%s' --date=short | column -ts'|' | less -r
View fix_symfony2_permissions.sh
#!/bin/sh
USER=$(whoami)
APACHE_USER=$(ps axho user,comm|grep -E "httpd|apache"|uniq|grep -v "root"|awk 'END {print $1}')
sudo chmod +a "$USER allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
sudo chmod +a "$APACHE_USER allow delete,write,append,file_inherit,directory_inherit" app/cache app/logs
echo "app/cache & app/logs been properly chmod'ed for $USER and $APACHE_USER"