Skip to content

Instantly share code, notes, and snippets.

View FROSADO's full-sized avatar

Fernando Rosado Altamirano FROSADO

  • Malaga, Spain
  • 00:36 (UTC +02:00)
View GitHub Profile
import calendar
from colorama import Fore, Back, Style, init
# Inicializar Colorama
init(autoreset=True)
# Create a calendar object for the year 2024
cal = calendar.Calendar()
year = 2024
# List of months
@FROSADO
FROSADO / apply-patch.yml
Created May 24, 2017 15:17
Ansible playbook install patch for windows 2012 - wannacry
---
- name : Apply patch for windows 2012
hosts: windows
vars:
hotfix: 'kb4012213'
tasks:
- name: Check ping , only for test pourpose
win_ping:
- block:
@echo off
rem = """ -*-Python-*- script
rem Those quotes are very useful for python code.
rem ------- Batch code ---------
rem define PYTHONPATH or any other envrionment variable
SET FOO=bar
rem ---------------------
@FROSADO
FROSADO / check_java.cmd
Last active April 25, 2022 23:15
Windows batch script that check if java is correctly installed and try to set the PATH with the first java found.
@echo off
:: Check if JAVA_HOME is setted and use the correct version.
Setlocal EnableDelayedExpansion
set _FIRST_CHECK="FALSE"
SET _CORRECT_JAVA_VERSION="1.8"
call :CheckJava _J_DETECTED
rem echo Java Version : %_J_DETECTED%