Skip to content

Instantly share code, notes, and snippets.

View shgonzalez's full-sized avatar
🏠
Working from home

Sergio H. Gonzalez. shgonzalez

🏠
Working from home
View GitHub Profile
Kernel Interface table
Iface MTU Met RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
bond0 1500 0 217363 0 0 0 7110 0 0 0 BMmRU
bond1 1500 0 36104 0 0 0 1807 0 0 0 BMmRU
bond2 1500 0 2410868 0 0 0 54764 0 0 0 BMmRU
em1 1500 0 111794 0 0 0 7110 0 0 0 BMsRU
em2 1500 0 18920 0 0 0 1807 0 0 0 BMsRU
em3 1500 0 1239471 0 0 0 54764 0 0 0 BMsRU
em4 1500 0 1171397 0 0 0 0 0 0 0 BMsRU
lo 16436 0 8214 0 0 0 8214 0 0 0 LRU
169.254.0.0/16 dev bond0 scope link metric 1008
169.254.0.0/16 dev bond1 scope link metric 1009
169.254.0.0/16 dev bond2 scope link metric 1010
@shgonzalez
shgonzalez / Triangulos.java
Created November 11, 2019 22:45
How to program in Java 8 Deitel & Deitel exercise triangule with stars
//Ejercicio 5.15
public class Triangulos {
public static void main (String[] a) {
//a
for ( int i = 1 ; i <= 10; i++ ) {
for ( int z=1; z<=i; z++) {
System.out.print("*");
}
@shgonzalez
shgonzalez / gist:470df0614c0cf77ff8e2c4718b11967d
Created February 7, 2020 17:53
Nagios perl script to read a certificate file, instead a host:port
#!/usr/bin/perl
# para modo debug colocar al final "-w"
#
# check_ssl_certificate
# Nagios script to check ssl certificate expirations
#
# Copyright (c) 2006-2008 David Alden <alden@math.ohio-state.edu>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
@shgonzalez
shgonzalez / check_ssl_certificate
Created February 7, 2020 17:54
Nagios perl script to read a certificate file, instead a host:port.
#!/usr/bin/perl
# para modo debug colocar al final "-w"
#
# check_ssl_certificate
# Nagios script to check ssl certificate expirations
#
# Copyright (c) 2006-2008 David Alden <alden@math.ohio-state.edu>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
---
- name: Configure users with public keys
hosts: all
vars:
users:
- name: user1
pkey: 'ssh-rsa AAAAB3NzaC........pIun6iSsRkiJKLdVoUHJysl0ULUzXDIhVN5sIvdbhb0jBsL2/C/T5M58Q== rsa-key-20201104'
- name: user2
pkey: 'ssh-rsa AAAAB3NzaC........uuyHrEB4hi8sArdqCk+1l2SwfNtokg2PyQqx9aBIJUdcYhH8W6'
@shgonzalez
shgonzalez / exam.txt
Last active October 30, 2021 10:55
Exam October 2021 for LE101 students
Antes de empezar debe crear la carpeta resultados en el home del usuario root. Todo lo solicitado en el examen debe guardarlo en esta carpeta.
Lo solicitado en el examen se debe ejecutar con el usuario root.
1- Identifique con du el directorio que ocupa más espacio en /usr/share/doc.
Debe guardar la salida del comando en el archivo du.txt en la carpeta resultados.
2- Crear la siguiente estructura de archivos y permisos en la carpeta resultados.
|-- [drwxrwxr-x] docs_examen
|-- [drwxr-x---] planillas
|-- [drwxrwxr-x] enero
@shgonzalez
shgonzalez / LE-201Exam
Created November 19, 2022 11:31
Linux Exam
Examen LE-201
1- Crear una instalacion CentOS nueva con la siguiente estructura de particiones MBR
Tipo de instalacion: Servidor con GUI
Zona Horaria: America/Asuncion
Tamano de disco: /dev/sda 20GiB
+----------+----------+-----------+----------+----------+
| P.Prim 1 | P.Prim 2 | P.Prim 3 | P.Extend | P.Logic 5|
|----------+----------+-----------+----------+----------+