Skip to content

Instantly share code, notes, and snippets.

Angel Alonso Adirael

Block or report user

Report or block Adirael

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Adirael / monit
Created Apr 28, 2016 — forked from clasense4/monit
Fresh Install monit from 0 Centos 6.5
View monit
# Init file for Monit system monitor
# Written by Stewart Adam <>
# based on script by Dag Wieers <>.
# chkconfig: - 98 02
# description: Utility for monitoring services on a Unix system
# processname: monit


This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.

The script is here:

convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2


View flickr-aspect-ratio.js
var vertical = 0;
var horizontal = 0;
var cuadrada = 0;
function(index, Element){
if(jQuery(Element).width() > jQuery(Element).height()){
horizontal = horizontal + 1;
} else if (jQuery(Element).width() < jQuery(Element).height()) {
vertical = vertical + 1;
#Retrive old website from Google Cache. Optimized with sleep time, and avoid 504 error (Google block Ip send many request).
#Programmer: Kien Nguyen - QTPros
#change search_site and search_term to match your requirement
import urllib, urllib2
import re
import socket
Adirael / class.DatabaseManager.php
Created Aug 21, 2012
A mysql database wrapper
View class.DatabaseManager.php
// Database
define('DB_HOST', 'localhost');
define('DB_DB', 'db_name');
define('DB_USER', 'db_user');
define('DB_PASS', 'db_password');
define('DB_ERROR', '/path/to/db_error.log');
Adirael /
Created Aug 17, 2012
Fix wordpress file permissions
# This script configures WordPress file permissions based on recommendations
# from
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
You can’t perform that action at this time.