Skip to content

Instantly share code, notes, and snippets.

View h3ct0rjs's full-sized avatar
:shipit:

Héctor F. Jiménez. S h3ct0rjs

:shipit:
View GitHub Profile
@h3ct0rjs
h3ct0rjs / ABC.md
Created January 18, 2021 11:01 — forked from jdnichollsc/ABC.md
The Job Interview Guide

The Job Interview Guide 💼

And English is a Work in Progress ⌛

@h3ct0rjs
h3ct0rjs / dockernotes.md
Created July 27, 2020 14:36
A cheatsheet for docker commands

Notas Resumen

  • docker version* : Muestre el comando y la version tanto para el cliente de docker, como para el demonio de docker.

  • docker help pul*l: muestra ayuda contextual del comando con nombre pull en este caso

  • docker images* :Lista la lista de imagenes disponibles en el host de docker. Es importante notar que las imagenes de docker tienen un tag, que es como el release o version de esa imagen, por defecto docker descarga el tag LATEST al ejecutar un pull. Las imagenes de docker tambien tienen algunos metadatos por decirlo asi extras como, IMAGE ID que identifican de manera unica y especifica, al lanzar el contenedor este tambien tiene tambien NAME y CONTAINER ID.

  • *docker rm CONTAINER ID: Elimina el contenedor con id.

  • docker rm CONTAINER NAME: Elimina el contenedor con nombre CONTAINER NAME

  • docker rm $(docker ps -aq) : Eliminar todos los contenedores en el host de docker. la opcion de -aq entrega una lista de ids.

  • ***docker rm $(docker ps

--- #Install Maria DB
- hosts: localhost
remote_user: ansible
become: yes
become_method: sudo
connection: ssh
gather_facts: yes
tasks:
- name : Installing MariDB
yum:
@h3ct0rjs
h3ct0rjs / BackupVMScript.ps1
Created July 14, 2020 14:46 — forked from brimston3/BackupVMScript.ps1
Backup Hyper-V VM with powershell
#requires -version 3.0
#requires -module Hyper-V
<#
.SYNOPSIS
Export virtual machines
.DESCRIPTION
This utility will export virtual machines to a target destination. By default
it will create a folder using the format:
sudo chown -R www-data.www-data /var/www/travel_list/storage
sudo chown -R www-data.www-data /var/www/travel_list/bootstrap/cache
@h3ct0rjs
h3ct0rjs / grafana custom.ini
Last active April 14, 2020 23:23 — forked from rrichards/grafana custom.ini
nginx config for using grafana, Influxdb via reverse proxy with authentication
# The full public facing url
#root_url = %(protocol)s://%(domain)s:%(http_port)s/
root_url = http://localhost:80/grafana/
@h3ct0rjs
h3ct0rjs / networkCommand.md
Created December 3, 2019 20:11 — forked from raulmoyareyes/networkCommand.md
Linux command to check Internet connection speed.

# View public IP

  • curl -s checkip.dyndns.org | sed 's#.Address: (.)</b.*#\1#'
  • wget -qO - icanhazip.com
  • curl ifconfig.me
  • curl ident.me
  • dig +short myip.opendns.com @resolver1.opendns.com
  • lynx -dump ifconfig.me | grep 'IP Address'
  • curl ipecho.net/plain
  • curl bot.whatismyipaddress.com
  • curl ipinfo.io
@h3ct0rjs
h3ct0rjs / Backup-Postgres.ps1
Created November 6, 2019 15:41 — forked from stefanprodan/Backup-Postgres.ps1
PostgreSQL cluster base backup automation made easy with PowerShell and Windows Task Scheduler or PgAgent. This script does the following: checks if there is enough free space to make a new backup (based on the last backup size), purges expired backups, creates a new folder for each backup, calls pb_basebackup to begin a tar gzip backup of every…
#############################################
##
## PostgreSQL base backup automation
## Author: Stefan Prodan
## Date : 20 Oct 2014
## Company: VeriTech.io
#############################################
# path settings
$BackupRoot = 'C:\Database\Backup';
@h3ct0rjs
h3ct0rjs / Backup-Postgres.ps1
Created November 6, 2019 15:41 — forked from stefanprodan/Backup-Postgres.ps1
PostgreSQL cluster base backup automation made easy with PowerShell and Windows Task Scheduler or PgAgent. This script does the following: checks if there is enough free space to make a new backup (based on the last backup size), purges expired backups, creates a new folder for each backup, calls pb_basebackup to begin a tar gzip backup of every…
#############################################
##
## PostgreSQL base backup automation
## Author: Stefan Prodan
## Date : 20 Oct 2014
## Company: VeriTech.io
#############################################
# path settings
$BackupRoot = 'C:\Database\Backup';
@h3ct0rjs
h3ct0rjs / Backup-Postgres.ps1
Created November 6, 2019 15:41 — forked from stefanprodan/Backup-Postgres.ps1
PostgreSQL cluster base backup automation made easy with PowerShell and Windows Task Scheduler or PgAgent. This script does the following: checks if there is enough free space to make a new backup (based on the last backup size), purges expired backups, creates a new folder for each backup, calls pb_basebackup to begin a tar gzip backup of every…
#############################################
##
## PostgreSQL base backup automation
## Author: Stefan Prodan
## Date : 20 Oct 2014
## Company: VeriTech.io
#############################################
# path settings
$BackupRoot = 'C:\Database\Backup';