This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# WARNING : This gist in the current form is a collection of command examples. Please exercise caution where mentioned. | |
# Docker | |
sudo apt-get update | |
sudo apt-get remove docker docker-engine docker.io | |
sudo apt install docker.io | |
sudo systemctl start docker | |
sudo systemctl enable docker | |
docker --version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input { | |
stdin { | |
codec => multiline { | |
pattern => "^\[%{MONTHDAY}-%{MONTH}-%{YEAR} %{TIME} %{TZ}\]" | |
negate => true | |
what => "previous" | |
auto_flush_interval => 10 | |
} | |
type => "php-error" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Instalación de FreeTDS y dependencias: | |
yum install freetds freetds-devel -y | |
# Instalación del módulo de PHP: | |
yum --enablerepo=remi install php-mssql -y | |
# Habilitar los siguientes booleanos: | |
setsebool -P httpd_can_network_connect 1 | |
setsebool -P httpd_can_network_connect_db 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$correo_destinatario = ""; | |
$nombre_remitente = ""; | |
$correo_remitente = ""; | |
$asunto = ""; | |
$mensaje = ""; | |
/* Hacemos uso de mb_encode_mimeheader para codificar correctamente caracteres especiales */ | |
$headers = 'From: "' . mb_encode_mimeheader($nombre_remitente) . '" <' . $correo_remitente . ">\r\n" | |
. 'Reply-To: ' . $correo_remitente . "\r\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pytesseract | |
import sys | |
import argparse | |
try: | |
import Image | |
except ImportError: | |
from PIL import Image | |
from subprocess import check_output | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/perl | |
use strict; | |
sub deswappify { | |
my $pid = shift; | |
my $fh = undef; | |
my $start_addr, $end_addr; | |
if(open F, "/proc/$pid/smaps") { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require_once 'config.php'; | |
$diferencia_mes = " "; | |
$estado = " "; | |
$mes_actual = " "; | |
$mes_actual = date("m"); | |
$año_actual = date("Y"); | |
//lista completa |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*jslint nomen: true, debug: true, evil: true, vars: true, browser: true, | |
devel: true */ | |
/*global */ | |
var CountDown = function(options){ | |
this.button = document.getElementById(options.button); | |
this.counter = document.getElementById(options.counter); | |
this.button.addEventListener('click', this.count_down.bind(this), false); |