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
# install conky | |
apt-get install conky-all | |
# Configure theme | |
# Save file as: .conkyrc | |
use_xft yes | |
xftfont 123:size=8 | |
xftalpha 0.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
ssl_protocols TLSv1 TLSv1.1 TLSv1.2; | |
ssl_ciphers "-ALL:EECDH+AES256:EDH+AES256:AES256-SHA:EECDH+AES:EDH+AES:!ADH:!NULL:!aNULL:!eNULL:!EXPORT:!LOW:!MD5:!3DES:!PSK:!SRP:!DSS:!AESGCM:!RC4"; | |
ssl_dhparam /etc/ssl/certs/dhparam.pem; | |
ssl_prefer_server_ciphers on; | |
keepalive_timeout 70; | |
ssl_stapling on; | |
ssl_stapling_verify on; | |
add_header X-Content-Type-Options nosniff; | |
add_header X-Frame-Options "SAMEORIGIN"; |
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 recibe dos parametros, 1 el carnet del estudiante, 2 el password | |
UUID=$(cat /proc/sys/kernel/random/uuid) | |
#Creo el usuario | |
BASE0=$(mysql -u root -ppasswd -D mysql -e "CREATE USER $1@localhost IDENTIFIED BY '$2'; " 2> /tmp/$UUID.txt) | |
#Le doy permisos de consulta | |
BASE1=$(mysql -u root -D mysql -ppasswd -e "GRANT USAGE ON *.* TO $1@localhost IDENTIFIED BY '$2' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;" 2>> /tmp/$UUID.txt) | |
#Creo la base | |
BASE2=$(mysql -u root -D mysql -ppasswd -e "CREATE DATABASE IF NOT EXISTS $1;" 2>> /tmp/$UUID.txt) |
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
server { | |
listen 80 ; | |
root /var/www/cet/; | |
index index.php index.html index.htm; | |
server_name cet115.wvides.info; | |
## | |
# Gzip Settings | |
## |
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
server { | |
listen 80 ; | |
listen [::]:80 ; | |
root /home/wilx/Documentos/seguimiento-desaparecidos/sources/nightly; | |
location = /favicon.ico { | |
log_not_found off; | |
access_log off; | |
} | |
location = /robots.txt { | |
allow all; |
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 | |
while read line | |
do | |
echo -e "Creando usuarios son password y eliminando la interaccion" | |
adduser --disabled-password --gecos "" $line | |
echo -e "Definiendo el password de cada usuario para ejecutar comandos via BASH sin problemas" | |
echo -e "$PASS\n$PASS" | passwd $line | |
echo -e "Agregando la estructura de directorio y archivo para agregar a cada usuario su llave" | |
su -c "mkdir /home/$line/.ssh/ && touch /home/$line/.ssh/authorized_keys" $line | |
echo -e "Creando una llave ssh para cada usuario por si tiene problemas" |
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
UPDATE TABLA SET CAMPO = REPLACE(CAMPO,'Á','A'); | |
UPDATE TABLA SET CAMPO = REPLACE(CAMPO,'É','E'); | |
UPDATE TABLA SET CAMPO = REPLACE(CAMPO,'Í','I'); | |
UPDATE TABLA SET CAMPO = REPLACE(CAMPO,'Ó','O'); | |
UPDATE TABLA SET CAMPO = REPLACE(CAMPO,'Ú','U'); | |
UPDATE TABLA SET CAMPO = REPLACE(CAMPO,'Ñ','N'); | |
UPDATE TABLA SET CAMPO = REPLACE(CAMPO,'ã','a'); | |
UPDATE TABLA SET CAMPO = REPLACE(CAMPO,'ä','a'); | |
UPDATE TABLA SET CAMPO = REPLACE(CAMPO,'å','a'); |
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 | |
$servername = ""; | |
$username = ""; | |
$password = ""; | |
$dbname = ""; | |
// Crea conexion | |
$conn = new mysqli($servername, $username, $password, $dbname); | |
if ($conn->connect_error) { | |
die("Connection failed: " . $conn->connect_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
from locust import HttpLocust, TaskSet | |
def login(l): | |
l.client.post("/login", {"username":"ellen_key", "password":"education"}) | |
def logout(l): | |
l.client.post("/logout", {"username":"ellen_key", "password":"education"}) | |
def index(l): | |
l.client.get("/") |
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
# 1. Introduction | |
# TimeOveflow is specially designed for and by Time Banks that physically exist | |
# 2. Overview | |
# This tutorial assumes that you are using a Debian Jessie as operating system, in this installation we are using digital ocean VPS | |
# 3. Prerequisites | |
# As root install all packages | |
# Add jessie-backports | |
echo "deb http://ftp.debian.org/debian jessie-backports main contrib non-free" | sudo tee -a /etc/apt/sources.list.d/jessie-backports.list | |
echo "deb https://oss-binaries.phusionpassenger.com/apt/passenger jessie main" | sudo tee -a /etc/apt/sources.list.d/passenger.list |
NewerOlder