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
CREATE OR REPLACE FUNCTION proteger_datos() RETURNS TRIGGER AS $proteger_datos$ | |
DECLARE | |
BEGIN | |
-- | |
-- Esta funcion es usada para proteger datos en un tabla | |
-- No se permitira el borrado de filas si la usamos | |
-- en un disparador de tipo BEFORE / row-level | |
-- |
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
gpg --no-default-keyring --keyring trustedkeys.gpg --keyserver keyserver.ubuntu.com --recv-keys 437D05B5 |
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 | |
# | |
# DESCRIPTION: | |
# | |
# Set the bash prompt according to: | |
# * the ruby version | |
# * the branch/status of the current git repository | |
# * the branch of the current subversion repository | |
# * the return value of the previous command | |
# |
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
-- Nota: Se deben sustituir los RAISE por INSERT en las tablas de auditoria | |
CREATE OR REPLACE FUNCTION auditoria() RETURNS TRIGGER | |
AS $aud$ | |
DECLARE | |
inst TEXT; | |
old_v TEXT; | |
new_v TEXT; | |
metadata_record RECORD; | |
BEGIN |
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
# gem install sqlite3-ruby | |
require 'sqlite3' | |
db=SQLite3::Database.new('bdprueba.db'); | |
db.execute("SELECT sqlite_version()") do |reg| | |
puts "SQLite version: #{reg[0]}" | |
end | |
db.close |
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
cid=1000 | |
vzctl set ${cid} --vmguarpages 512M --save | |
vzctl set ${cid} --oomguarpages 512M --save | |
vzctl set ${cid} --privvmpages 512M:1024M --save | |
#Fuente: http://www.linux-os.com.ar/linuxos/como-ampliar-la-memoria-de-un-contenedor-openvz-add-memory-to-a-container-openvz/ |
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
CREATE FUNCTION int_to_text(INT4) RETURNS TEXT AS ' | |
SELECT textin(int4out($1)); | |
' LANGUAGE SQL STRICT IMMUTABLE; | |
CREATE CAST (INT4 AS TEXT) | |
WITH FUNCTION int_to_text(INT4) | |
AS IMPLICIT; |
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
1)Modificamos el config/environment.rb: | |
Rails::Initializer.run do |config| | |
config.gem 'will_paginate', :version => '~> 2.3.15', :source => 'http://gemcutter.org' | |
2) en el controlador: | |
@arrDatos = Modelo.paginate(:all, :per_page =>10, :page => params[:page]) | |
3) en la vista: |
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
Si al hacer un hg | |
$ hg clone https://192.168.10.205/hg/sas_2011 | |
abort: error: _ssl.c:497: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed | |
1) Ejecutamos esta linea en la consola: | |
$echo quit |openssl s_client -connect 192.168.10.205:443 2>/dev/null|awk '/---BEG/,/--END/' |openssl x509 -fingerprint -noout | |
2) y obtenemos: | |
SHA1 Fingerprint=64:A4:7F:0C:39:A4:81:00:81:BC:44:75:18:31:32:22:3F:EB:E8:BE |
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
Host nombre_logico | |
Hostname 192.168.10.1 | |
User usuario | |
Port 22 | |
# Nota: Este archivo vá en: ~/.ssh/config |