Skip to content

Instantly share code, notes, and snippets.

View raultm's full-sized avatar

Raul Tierno raultm

View GitHub Profile
@raultm
raultm / gist:5410c49622123f563fee1913600672b7
Last active February 14, 2022 08:34
Instalación de x11vnc y creación/arranque de servicio en systemd
View gist:5410c49622123f563fee1913600672b7
#!/bin/bash
# Instalación de paquete x11vnc
apt-get install x11vnc -y
# Creación de archivo de configuración de servicio para systemd
echo "# Description: Custom Service Unit file
# File: /etc/systemd/system/x11vnc.service
[Unit]
Description="x11vnc"
@raultm
raultm / MRBS Ubuntu 18 commands
Created September 5, 2019 09:58
MRBS commands
View MRBS Ubuntu 18 commands
# Instalación y configuración
wget https://raw.githubusercontent.com/raultm/setup-mrbs/master/mrbs-install-configure.sh && sh ./mrbs-install-configure.sh && rm ./mrbs-install-configure.sh
# Instalación LAMP (Apache/MySQL/PHP) y MRBS
wget https://raw.githubusercontent.com/raultm/setup-mrbs/master/01_Ubuntu18_LAMP_mrbs.sh && sh ./01_Ubuntu18_LAMP_mrbs.sh && rm ./01_Ubuntu18_LAMP_mrbs.sh
# Archivo Configuración MRBS (/var/www/html/config.inc.php)
wget https://raw.githubusercontent.com/raultm/setup-mrbs/master/02_configure-mrbs-ies.sh && sh ./02_configure-mrbs-ies.sh && rm ./02_configure-mrbs-ies.sh
# Solventar problemas con Locale si meses/dias no aparecen en español
@raultm
raultm / script.ps1
Created June 3, 2019 07:06
Execute ps1 script in Powershell Terminal with privileges
View script.ps1
Set-ExecutionPolicy Unrestricted -Force; iex ((New-Object System.Net.WebClient).DownloadString('http://server/path/to/script.ps1'))
@raultm
raultm / google-chrome
Created April 10, 2019 08:24
Google Chrome --disable-print-preview
View google-chrome
#!/bin/bash
#
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Let the wrapped binary know that it has been run through the wrapper.
export CHROME_WRAPPER="`readlink -f "$0"`"
HERE="`dirname "$CHROME_WRAPPER"`"
@raultm
raultm / sources.list
Last active January 16, 2019 09:44
Sources List to get Zabbix
View sources.list
#------------------------------------------------------------------------------#
# OFFICIAL UBUNTU REPOS #
#------------------------------------------------------------------------------#
# curl https://gist.githubusercontent.com/raultm/be1a4467e836f0a64ab6f9b2afe41760/raw/513da0c984b92fde56a49c73e6e7bd198a9be611/sources.list | sudo tee /etc/apt/sources.list && sudo apt update
###### Ubuntu Main Repos
deb http://es.archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://es.archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse
@raultm
raultm / zabbixinstall.sh
Created January 16, 2019 09:36
Zabbix install & its front-end
View zabbixinstall.sh
# Package installation
apt install zabbix-agent -y
apt install zabbix-server-mysql -y
# MySql Database creation
mysql -uroot -ptest -e 'create database zabbix character set utf8 collate utf8_bin'
mysql -uroot -ptest -e "grant all privileges on zabbix.* to zabbix@localhost identified by 'zabbix'"
# MySql population of tables & data
zcat /usr/share/zabbix-server-mysql/{schema,images,data}.sql.gz | mysql -uzabbix -pzabbix zabbix
View 30-vbox-automount.rules
DRIVERS=="usb-storage", RUN+="/etc/udev/vboxusb.sh %p"
@raultm
raultm / vboxusb.sh
Last active January 14, 2019 07:55
View vboxusb.sh
#!/bin/bash
INCREMENTDIR=`date +%Y-%m-%d`
LOGFILE=/root/usb/$INCREMENTDIR
attach_storage()
{
set `lsusb -d ${ID_VENDOR_ID}:${ID_MODEL_ID}| sed 's/:.*//g'`
while [ ! -z "$1" ]; do
case $1 in
Bus) shift
@raultm
raultm / README.md
Created November 9, 2018 21:12
Vue + Firebase + Auth Demo
View README.md

Vue + Firebase + Auth Demo

A simple App using Vue.js & Firebase with Auth.

See the DEMO.

@raultm
raultm / listenwol.sh
Created October 31, 2018 12:35
Listen WoL
View listenwol.sh
tcpdump -i enp6s2 '(udp and port 7) or (udp and port 9)'