This file contains hidden or 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
| function validar_datos(form_id, password1, password2) { | |
| var regex = {"number": /^[0-9]+$/, "email": /^[a-zA-Z0-9\._-]+@[a-zA-Z0-9-]{2,}[.][a-zA-Z]{2,4}$/, "date": /^([0-9]{4}\-[0-9]{2}\-[0-9]{2})$/}; | |
| var flag = true; | |
| $(form_id + ' input').each(function(key, input) { | |
| $(input).removeAttr('title').parent().removeClass('has-error'); | |
| if ($(input).hasClass('required')) { | |
| if (($(input).val() == '' || $(input).val() == '-1')) { | |
| flag = false; | |
| $(input).attr('title', 'Este campo es requerido.').parent().addClass('has-error'); | |
| } else if (!$(input).hasClass('no-regex') && $(input).attr('type') != 'text') { |
This file contains hidden or 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
| #!/bin/bash | |
| ################################################# | |
| ## Script para Backups servidor LAMP ## | |
| ################################################# | |
| ## Poner en true si solo es un sitio | |
| UNSITIO=false | |
| ## Directorio de backup y temporal | |
| BKDIR="/home/user/backups" |
This file contains hidden or 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
| use strict; | |
| use Irssi; | |
| use vars qw($VERSION %IRSSI); | |
| $VERSION = "1.0"; | |
| %IRSSI = ( | |
| authors => "kid_goth", | |
| contact => "g0th4ck[at]gmail[dot]com", | |
| name => "leet", | |
| licence => "Pa todos y todas", |
This file contains hidden or 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 | |
| /** | |
| * Clase que encapsula las funciones de subida de archivos con su | |
| * seguridad correspondiente | |
| * @author Brandon Sanchez | |
| * | |
| */ | |
| class Upload | |
| { |
This file contains hidden or 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 | |
| /** | |
| * @autor: Brandon Sanchez | |
| * @license MIT 2014, Brandon Sanchez | |
| * @todo Consultar los RSS de los foros en un archivo txt para | |
| * enviar por privado al usuario que lo pida con !news | |
| * | |
| * @filesource $archivoURL es la ruta del archivo que tiene los foros | |
| * y sus respectivas urls, el formato debe ser así en cada | |
| * linea: |
This file contains hidden or 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; | |
| use IO::Socket; | |
| ################################################################ | |
| # Prueba perl de botIRC # | |
| # Objetivo del proyecto aprender manejo de perl con algunas # | |
| # de sus funciones y sobre todo sockets xD... # | |
| # # |
This file contains hidden or 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 | |
| /* | |
| * Juego de blackjack en consola | |
| * programado en php | |
| * | |
| * @author Brandon Sanchez | |
| */ | |
| class blackjack | |
| { |
This file contains hidden or 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 | |
| /** | |
| * @autor: Brandon Sanchez | |
| * @Description: Herramienta en el conocido lenguage php para la generacion de thumbnails | |
| * sobre las imagenes contenidas en una carpeta. | |
| * @Creacion: 13/04/2013 | |
| * @Actualizacion: 04/07/2013 (Se agrego salida general a un unico formato) | |
| */ | |
| error_reporting(0); |
This file contains hidden or 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
| -- For prevent revisión of foreign keys | |
| SET FOREIGN_KEY_CHECKS = 0; | |
| -- OPTIONAL: If you have too much tables | |
| SET GROUP_CONCAT_MAX_LEN=32768; | |
| -- Initialize var @tables | |
| SET @tables = NULL; | |
| -- Set appropriate value for table, schema_naame can be Concatenated too | |
| SELECT GROUP_CONCAT('`', table_name, '`') INTO @tables | |
| FROM `information_schema`.`tables` |
NewerOlder