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
Apache2 | |
Desactivar index | |
a2dismod autoindex | |
sudo service apache2 restart | |
https cerbot-auto | |
https://certbot.eff.org/docs/install.html | |
wget https://dl.eff.org/certbot-auto |
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
https://www.howtoforge.com/tutorial/how-to-set-up-master-slave-replication-for-postgresql-96-on-ubuntu-1604/ | |
cd /etc/postgresql/9.4/main/ | |
nano postgresql.conf | |
listen_addresses = 'IP_MASTER o * para cualquier IP' | |
wal_level = hot_standby | |
synchronous_commit = local | |
archive_mode = on |
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 hacer la copia de seguridad desde 192.168.188.5 a | |
# 192.168.188.4 (servidor espejo) | |
function loginfo(){ | |
myUser="rsync" | |
logger -p user.info "${myUser}[$$]: $1" | |
} |
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 | |
# | |
# Postgres backup script | |
# This script must be run with root mysql account | |
# | |
# POSTGRES connection info | |
MYUSER=postgres | |
MYPASS=Zorro1 | |
MYHOST=localhost |
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
mysql FEDERATED es un link de una tabla a otra tabla remota, | |
no es bueno usar si se tienen muchos datos. | |
Si son pocos pues aquí la solución a menos que quieras construir un script de sincronización y ponerlo en un crontab | |
-- Tabla con conexion a una base de datos remota | |
CREATE TABLE tabla_remota | |
( | |
id INT NOT NULL AUTO_INCREMENT, | |
campo1 VARCHAR(32), |
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
Regular expression cheat sheet for Varnish | |
Varnish regular expressions are NOT case sensitive. Varnish uses POSIX | |
regular expressions, for a complete guide, see: "man 7 regex" | |
Basic matching: | |
req.url ~ "searchterm" | |
True if req.url contains "searchterm" anywhere. | |
req.url == "searchterm" |
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
# Configuration script for sphinx trainer -*-mode:Perl-*- | |
$CFG_VERBOSE = 1; # Determines how much goes to the screen. | |
# These are filled in at configuration time | |
$CFG_DB_NAME = "aymara"; | |
# Experiment name, will be used to name model files and log files | |
$CFG_EXPTNAME = "$CFG_DB_NAME"; | |
# Directory containing SphinxTrain binaries |
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
server { | |
listen 8080 default; | |
listen [::]:8080 default; | |
server_name www.dominio.com.bo dominio.com.bo; | |
root /var/www/html/dominio.com.bo/; | |
fastcgi_buffers 8 4K; | |
location /pma { | |
root /var/www/html/; |
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
Este codigo compilara sin problemas | |
#include <iostream> | |
#include <cstdio> | |
#include <cmath> | |
using namespace std; | |
int main(){ | |
//Su codigo | |
return 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
import java.util.Scanner; | |
class Main{ | |
public static void main(String[] args) { | |
//tu codigo | |
} | |
} |