Skip to content

Instantly share code, notes, and snippets.

View tonyskapunk's full-sized avatar
🚀

Tony Garcia tonyskapunk

🚀
View GitHub Profile
@tonyskapunk
tonyskapunk / ansible.md
Last active September 20, 2019 20:50
ansible

Ansible

¿Qué es Ansible?

Ansible es una herramienta que facilita la automatización de diferentes etapas en la infrastructura de las Tecnologías de Información(TI), por ejemplo en el provisionamiento de servidores, en la administración de configuraciones, en el despliegue de aplicaciones, orquestación de actvidades entre otras cosas.

Ansible fue diseñado para modelar la infrastructura de TI de una manera descriptiva teniendo en consideracion multiples capas. Esto es mucho más común en ambientes empresariales.

Una de las caracteristicas más populares de Ansible es que no necesita un agente, ni tampoco necesita una infrastructura de seguridad adicional para su funcionamiento, aunado a esto utiliza un lenguaje muy sencillo(YAML) para definir las acciones a realizar. La simplicidad es una de las cosas que caracteriza a Ansible.

Ansible es el nombre de un "sistema de comunicación inmediato" ficticio basado en un libro "El Juego de Ender

Antes:
1 - #linux_mx: ban *!*jb@unaffiliated/jebus [by adams.freenode.net, 2495219 secs ago]
*2 - #linux_mx: ban *!*@189.238.179.202 [by adams.freenode.net, 2495219 secs ago]
3 - #linux_mx: ban *!*jebus*@* [by adams.freenode.net, 2495219 secs ago]
*4 - #linux_mx: ban *!*jebus@201.127.83.* [by adams.freenode.net, 2495219 secs ago]
5 - #linux_mx: ban *!*bba00294@*.187.160.2.148 [by adams.freenode.net, 2495219 secs ago]
*6 - #linux_mx: ban *!*BlouBlou@unaffiliated/bloublou [by adams.freenode.net, 2495219 secs ago]
7 - #linux_mx: ban *!*bba0ea2f@*.187.160.234.47 [by adams.freenode.net, 2495219 secs ago]
8 - #linux_mx: ban jebus!*@* [by adams.freenode.net, 2495219 secs ago]
*9 - #linux_mx: ban *!*dasda@unaffiliated/jebus [by adams.freenode.net, 2495219 secs ago]
@tonyskapunk
tonyskapunk / netcat
Created March 2, 2016 16:53
nc zero I/O
$ nc -vw1 google.com 443 </dev/null
Ncat: Version 7.00 ( https://nmap.org/ncat )
Ncat: Connected to 173.194.205.101:443.
Ncat: 0 bytes sent, 0 bytes received in 0.09 seconds.
@tonyskapunk
tonyskapunk / dist.sh
Created August 4, 2016 17:10
Tolkien Distribution Name
for letter in {A..Z}; do echo -n "${letter}":; links -dump http://www.behindthename.com/namesakes/list/tolkien/alpha|awk '/IMG/ {print $1}'| grep -c ^${letter}; done
A:100
B:83
C:28
D:45
E:60
F:59
G:70
H:63
I:28
@tonyskapunk
tonyskapunk / readme.md
Last active February 14, 2019 15:43
pypi release how-to

Releasing to pypi

Requirements

Config file for ~/.pypirc

[pypi]
username: theusername
password: theusernamepassword
@tonyskapunk
tonyskapunk / recaplog.md
Last active January 6, 2017 18:43
recaplog basic tests

Number of files in my test recap var log:

[root@gnu ~]# find /var/log/recap |wc -l
170580

Dry run

[root@gnu ~]# recaplog -n
2017-01-06 17:41:16+00:00 [INFO] --- Starting dry run ---
@tonyskapunk
tonyskapunk / test.md
Last active February 6, 2017 16:55
tables

Currently:

| | Installation | Configuration | Troubleshooting | Patching | | --- | --- | --- | --- | --- | --- | | Apache | Yes | Yes | Yes | Yes | | NGINX | Yes | Yes | Yes | Yes |

without bolds and centered:

| | Installation | Configuration | Troubleshooting | Patching |

[root@gnu recap]# cat recaplog.log
2017-03-03 17:02:56+00:00 [INFO] --- Starting run ---
2017-03-03 17:02:56+00:00 [INFO] Compressing old log files
2017-03-03 17:02:56+00:00 [INFO] Packing fdisk...
2017-03-03 17:02:56+00:00 [INFO] Moving 144 logs to: /var/log/recap/fdisk_daily_20170302
2017-03-03 17:02:56+00:00 [INFO] Compressing 144 logs into: /var/log/recap/fdisk_daily_20170302.log.tar.gz
2017-03-03 17:02:56+00:00 [INFO] Deleting 144 logs.
2017-03-03 17:02:56+00:00 [INFO] Packing mysql...
2017-03-03 17:02:56+00:00 [INFO] Moving 144 logs to: /var/log/recap/mysql_daily_20170302
2017-03-03 17:02:56+00:00 [INFO] Compressing 144 logs into: /var/log/recap/mysql_daily_20170302.log.tar.gz
@tonyskapunk
tonyskapunk / tests.md
Last active March 10, 2017 16:06
recaplog tests
  1. Without log compression and no logs available, dryrun
[root@gnu ~]# recaplog -n
2017-03-10 15:43:18+00:00 [INFO] recaplog (13279): Created lock file: /var/lock/recaplog.lock
2017-03-10 15:43:18+00:00 [INFO] --- Starting dry run ---
2017-03-10 15:43:18+00:00 [INFO] Not compressing old log files
2017-03-10 15:43:18+00:00 [INFO] Packing fdisk...
2017-03-10 15:43:18+00:00 [ERROR] An error ocurred while reading logs: 'ls: cannot access /var/log/recap/fdisk_20170309-*.log: No such file or directory', skipping...
2017-03-10 15:43:18+00:00 [INFO] Packing mysql...
2017-03-10 15:43:18+00:00 [ERROR] An error ocurred while reading logs: 'ls: cannot access /var/log/recap/mysql_20170309-*.log: No such file or directory', skipping...
@tonyskapunk
tonyskapunk / tests_examples.md
Created March 17, 2017 18:01
recap single DOTMYDOTCONF
  1. Using a non-valid config file:
2017-03-17_17:39:30
Error when attempting to read: /root/.my2.cnf,/root/.my2.cnf,/root/.my3.cnf, please check the DOTMYDOTCNF setting in the configuration file
  1. Using a valid config file with no spaces:
# cat "mysql.log_snapshot_2017-03-17_17:37:08"                                                                          
2017-03-17_17:37:08