Skip to content

Instantly share code, notes, and snippets.

@wilxsv
wilxsv / create_user
Created February 28, 2018 22:14
creacion de usuarios en mysql
--Se crea el usuario
CREATE USER t3mp0r4lp57@localhost IDENTIFIED BY ‘############’;
--Se define limite consultas
GRANT USAGE ON *.* TO t3mp0r4lp57@localhost IDENTIFIED BY ‘############’ WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;
--Se crea una base de datos [opcional]
CREATE DATABASE IF NOT EXISTS t3mp0r4lp57;
--Se otorgan privilegios sobre la base
GRANT ALL PRIVILEGES ON t3mp0r4lp57.* TO t3mp0r4lp57@localhost;
# Elasticsearch requiere Java 8 o superior
# Agregar las llaves pgp para el repositorio
# wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
# Agregar a nuestras fuentes el repositorio
deb http://ftp.debian.org/debian jessie-backports main
# Actualizar e instalar
apt-get update && apt-get -t jessie-backports install elasticsearch
# En el archivo
@wilxsv
wilxsv / add_file_extensions.js
Created February 21, 2018 03:43
Redefinicion de extenciones para seguimiento en matomo
<!-- Matomo -->
<script type="text/javascript">
var _paq = _paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function() {
var u="//tracking.prisma.sv/";
_paq.push(['setTrackerUrl', u+'piwik.php']);
@wilxsv
wilxsv / index.html
Last active February 9, 2018 05:24
example topojson for dia
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Maps with Leaflet,TopoJSON & Chroma.js</title>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<style>
*{
margin:0;
padding:0;
@wilxsv
wilxsv / countries.topo.json
Last active February 8, 2018 12:38 — forked from moklick/countries.topo.json
Maps with TopoJSON, Leaflet & Chroma.js http://blog.webkid.io
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wilxsv
wilxsv / install_ruby_rails_RENV.sh
Created December 14, 2017 16:19
instalacion de ruby y rails en un entorno de desarrollo, instala cualquier version de ruby y cualquier version de rails
sudo apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm3 libgdbm-dev curl git-core
git clone https://github.com/rbenv/rbenv.git ~/.rbenv
echo 'export PATH="$HOME/.rbenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(rbenv init -)"' >> ~/.bashrc
source ~/.bashrc
git clone https://github.com/rbenv/ruby-build.git ~/.rbenv/plugins/ruby-build
#lista las versiones de ruby [rbenv install -l]
rbenv install 2.3.0
rbenv global 2.3.0
echo "gem: --no-document" > ~/.gemrc
@wilxsv
wilxsv / ssl-params.conf
Created December 1, 2017 00:36
Archivo de configuracion para habilitar https con nginx
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH";
ssl_ecdh_curve secp384r1;
ssl_session_cache shared:SSL:10m;
ssl_session_tickets off;
ssl_stapling on;
ssl_stapling_verify on;
resolver 8.8.8.8 8.8.4.4 valid=300s;
resolver_timeout 5s;
[gammu]
#connection = at115200
#port = /dev/ttyUSB0
connection = at19200
port = /dev/ttyACM0
logformat = textall
logfile = /var/log/gammu-smsd.log
DebugLevel = 255
DeliveryReport = log
ReceiveFrequency = 5
# !/bin/sh
# todos los comandos son ejecutados desde root, no se hace uso de sudo.
apt-get update
apt-get upgrade
apt-get install nginx mysql-server php-fpm php-mysql
systemctl enable php7.0-fpm
apt-get install libfcgi0ldbl unzip php7.0-xml
# Configurar el
server {
listen 80;
server_name DOMINIO.ORG ;
root /opt/pentaho-server/tomcat/webapps/pentaho;
location / {
proxy_pass http://127.0.0.1:8080/;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;