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
CREATE OR REPLACE FUNCTION CODIGO_BARRAS_GENERAR_DV(P_CODIGO IN VARCHAR2, P_TIPO VARCHAR2 DEFAULT 'EAN13') RETURN VARCHAR2 IS | |
L_SUM NUMBER; | |
L_MULTIPLE NUMBER; | |
V_CODIGO_EAN13 VARCHAR2(13) DEFAULT NULL; | |
BEGIN | |
IF (P_TIPO = 'EAN13') THEN | |
V_CODIGO_EAN13 := SUBSTR(LPAD(P_CODIGO,12,'0'),1,12); | |
FOR I IN 1..12 LOOP | |
IF (MOD(I,2) = 0) THEN | |
L_MULTIPLE := 3; |
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
#!/bin/bash | |
# Variables | |
# OBS VARIABLE FILES_LIFE_TIME: Cuando el valor es 1, los archivos a | |
# ser eliminados son los que tienen una antiguedad mayor a 48 horas, | |
# si el valor de la variable es 2, los archivos que seran eliminados | |
# seran aquellos con una antiguedad mayor a 72 horas, y si por ejemplo | |
# el valor de la variable es cero 0, los archivos eliminados seran | |
# aquellos cuya antiguedad sea mayor a 24 horas en existencia. | |
PATH_ARCHIVES_LOCAL=/backups | |
FILES_LIFE_TIME=2 |
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
#!/bin/bash | |
# Obteniendo el mes en letras | |
MES=`date +"%B"` | |
# Detectando fin de mes y mostrando en pantalla. | |
TOMORROW=`date --date=tomorrow +%d` | |
if [ $TOMORROW -eq "1" ]; then | |
echo "ALERTA: Hoy es el último día de $MES!" | |
fi |
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
#!/bin/bash | |
# Procedimiento de sincronizacion de repositorios previa verificacion de existencia de carpeta. | |
if [ -d /opt/opensuse/12.3/repo/update/ ]; then | |
rsync --times --perms --recursive --links --verbose --progress mirrors.nl.eu.kernel.org::opensuse/update/12.3/ /opt/opensuse/12.3/repo/update/ --delete-after --human-readable --itemize-changes --stats --exclude=x86_64 | |
fi | |
if [ -d /opt/opensuse/12.3/repo/oss/ ]; then | |
rsync --times --perms --recursive --links --verbose --progress mirrors.nl.eu.kernel.org::opensuse/distribution/12.3/repo/oss/ /opt/opensuse/12.3/repo/oss/ --delete-after --human-readable --itemize-changes --stats --exclude=x86_64 | |
fi | |
if [ -d /opt/opensuse/12.3/repo/non-oss/ ]; then |
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
#!/bin/sh | |
# Author: www.tormentadebits.com | |
# | |
# /etc/init.d/glassfish | |
# | |
### BEGIN INIT INFO | |
# Provides: glassfish | |
# Required-Start: $network | |
# Required-Stop: $network | |
# Default-Start: 3 5 |
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
#!/bin/sh | |
# | |
# tomcat start/stop script | |
# Usage: tomcat6 [ start | stop | enable | disable | restart | status ] | |
# | |
set -a | |
# Definitions | |
# Paths to tomcat files, and a label | |
TOMCAT_HOME="/opt/apache-tomcat-6.0.35" |
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
#!/bin/bash | |
# | |
# SCRIPT DE PRUEBA - LEER CONTRASENIAS | |
# ==================================== | |
# | |
# -- Se libera la variable. | |
unset SECRET_PASSWD | |
# -- Se solicita la introduccion del password y | |
# se despliega un asterisco por cada character |
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
#!/bin/bash | |
# | |
# SCRIPT DE PRUEBA - LEER CONTRASENIAS | |
# ==================================== | |
# | |
# -- Se guarda la configuracion de la sesion | |
# stty actual. | |
STTY_SAVE=`stty -g` | |
stty -echo | |
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
#!/bin/bash | |
# | |
# -- Definicion de variables globales | |
PWD_ACTUAL=`pwd` | |
source $PWD_ACTUAL/vars > /dev/null | |
CLIENT="" | |
CA_CRT=$KEY_DIR/ca.crt | |
TA_KEY=$KEY_DIR/ta.key | |
DEFAULT_SERVER_IP="ip_o_dominio_servidor" | |
DEFAULT_SERVER_PORT="1194" |
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
#!/bin/sh | |
# Author: Gabriel K | |
# | |
# /etc/init.d/iperfd | |
# | |
### BEGIN INIT INFO | |
# Provides: iperf | |
# Required-Start: $network | |
# Required-Stop: $network | |
# Default-Start: 3 5 |
OlderNewer