Skip to content

Instantly share code, notes, and snippets.

View raultm's full-sized avatar

Raul Tierno raultm

View GitHub Profile
@raultm
raultm / DemoTest.php
Created May 15, 2014 15:13
Autotesting with CakePHP and Gulp
<?php
namespace App\Test\TestCase\Custom;
use Cake\TestSuite\TestCase;
class DemoTest extends TestCase {
public function testDemo(){
$this->assertEquals(1, 1);
}
@raultm
raultm / commands.sh
Last active January 21, 2016 09:14
Comandos frecuentes
# Montar unidad
fdisk -l # Listar unidades montables
mkdir /path/to/mount # Creamos carpeta donde vamos a montar unidad
mount -t [type] [/path/to/device] [/path/to/mount] # De la información de los dos comandos anteriores ya podemos montar
public class GoalUseCaseImpl implements GoalUseCase{
private Match match;
private Squad squad;
Callback callback;
ApplyIncidentUseCase applyIncidentUseCase;
private int minute;
private int second;
@raultm
raultm / Impresora HP OfficeJet Pro X476dw MFP.md
Last active June 8, 2017 07:42
Update Color Option disabled

Impresora HP OfficeJet Pro X476dw MFP

Administracion

  • Cambiar contraseña de Administración
  • Filtrar acceso de impresora por red
  • Desactivar la impresión a color

Cambiar contraseña de administracion

@raultm
raultm / setupsiaticwifi.sh
Last active June 16, 2017 08:04
First Version of Script to setup Wifi AP in SIATICS
# SOURCE Bashstyling (https://gist.github.com/raultm/c68dca2d076273f569b51653503ead05)
source <(curl -s https://gist.githubusercontent.com/raultm/c68dca2d076273f569b51653503ead05/raw)
h1 "Vamos a preparar el router wifi de una SIATIC"
info "Indica nombre del aula. Será el SSID de la Wifi. Ej: a19, Infolab, Aula24: "
read AULA
info "Indica la contraseña del router. Busca en la lista el correo subject:\"[SIATIC] Punto acceso wifi\" del 27/01/16 "
read -s -p "Password: " ROUTERPASS
@raultm
raultm / generatemusthave
Created June 15, 2017 09:09
Generate MustHave file for pkgsync
#!/bin/bash
#
# Crea un fichero /etc/pkgsync/musthave con la lista de paquetes instalados de forma
# intencionada en el sistema.
# Normalmente lo utilizamos para mantener el mismo software instalado en una serie de máquinas
# mediante pkgsync, aunque también podríamos usarlo para clonar los paquetes instalados en otra
# máquina con dpkg --set-selections.
##!/bin/bash
#
# Crea un fichero /etc/pkgsync/musthave con la lista de paquetes instalados de forma
@raultm
raultm / setupsiatic.sh
Last active June 19, 2017 07:16
Script to setup siatic after restore image siatic 64 bits with clonezilla
#!/bin/bash
#
# name : setupsiatic
# description : Prepara una SIATIC paso por paso usando puntos del documento colaborativo
# author : Raúl Tierno
# creation : 09062017
# last modification : 09062017
# uso : setupsiatic a19
# install : Save in /usr/local/sbin/
# suggestion : Use after install official image of SIATIC 64Bits
@raultm
raultm / menu
Last active June 16, 2017 08:08
Menú para recopilar scripts/tareas para institutos de Extremadura
#!/bin/bash
# Permlaink to GIST raw https://gist.github.com/atenni/5604615
# bash <(curl -s https://gist.githubusercontent.com/raultm/1095716dfd8223fd3e4daf223326a018/raw)
# SOURCE Bashstyling (https://gist.github.com/raultm/c68dca2d076273f569b51653503ead05)
source <(curl -s https://gist.githubusercontent.com/raultm/c68dca2d076273f569b51653503ead05/raw)
siaticmenu(){
while :
do
@raultm
raultm / bashstyling
Created June 16, 2017 07:17
Bash Styling
#!/bin/bash
RESTORE=$(echo -en '\033[0m')
# \033[STYLE;COLORm OR \033[STYLE;BGCOLOR;COLORm
# STYLES 01:BOLD; 02:LIGHT; 03:???; 04:UNDERLINE; 05:???; 06:INVERSE
RED=$(echo -en '\033[00;31m')
GREEN=$(echo -en '\033[00;32m')
YELLOW=$(echo -en '\033[00;33m')
BLUE=$(echo -en '\033[00;34m')
MAGENTA=$(echo -en '\033[00;35m')
PURPLE=$(echo -en '\033[00;35m')
@raultm
raultm / activa-nat
Created June 16, 2017 07:34
activa-nat
#! /bin/sh
### BEGIN INIT INFO
# Provides: activa-nat
# Required-Start: $remote_fs
# Should-Start: $network $syslog
# Required-Stop: $remote_fs
# Should-Stop: $network $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Enabling NAT for clients behind eth1