View esp32-webserver-led.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import machine | |
import socket | |
import time | |
# Importamos modulo network | |
import network | |
global sta_if | |
# Instanciamos el objeto -sta_if- para controlar la interfaz STA | |
sta_if = network.WLAN(network.STA_IF) | |
# COMIENZA EL BUCLE - SI NO EXISTE CONEXION | |
if not sta_if.isconnected(): |
View powershell-criptomoneda.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
############################### | |
## RAUL UNZUE - ELBLOGDENEGU | |
## PRECIO CRIPTOMONEDA | |
############################## | |
$Moneda = "ADA" | |
## LOG | |
$Logfile = "/Users/elblogdenegu/Documents/criptomonedas.log" | |
Start-Transcript -Path $Logfile -Append | |
# FECHA Y HORA |
View powershell-impresoras-mapeadas.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################### | |
## RAUL UNZUE - EL BLOG DE NEGU | |
## IMPRESORAS MAPEADAS | |
######################### | |
## LOG | |
$Logfile = "\\nas\elblogdenegu\IMPRESORAS\impresoras.log" | |
#Start-Transcript -Path $Logfile -Append | |
# FECHA Y HORA |
View powershell-grupos-ad-user-csv.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
################### | |
### RAUL UNZUE - ELBLOGDENEGU | |
### SCRIPT POWERSHELL | |
## EXTRAER USUARIOS GRUPOS AD | |
################### | |
$groups = (Get-AdGroup -SearchBase "OU=IMPRESORAS,DC=NEGU,DC=LOCAL" -filter * | Where {$_.name -like "**"} | select name -expandproperty name) | |
$Table = @() | |
$Record = @{ | |
"Group Name" = "" |
View powershell-backup-incremental-usb-unidad.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
####################################### | |
## RAUL UNZUE - ELBLOGDENEGU | |
## 02/12/2020 | |
## SCRIPT COPIADO INCREMENTAL PERFIL | |
####################################### | |
#CERRAR OUTLOOK | |
#Bucle que solicita cerrar Outlook hasta que no detecta ningun proceso outlook corriendo | |
#Para que deje copiar PSTs Outlook tiene que estar cerrado | |
Do { | |
Write-Host "" |
View powershell-backup-incremental-usb.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
####################################### | |
## RAUL UNZUE - ELBLOGDENEGU | |
## 02/12/2020 | |
## SCRIPT COPIADO INCREMENTAL PERFIL | |
####################################### | |
#CERRAR OUTLOOK | |
#Bucle que solicita cerrar Outlook hasta que no detecta ningun proceso outlook corriendo | |
#Para que deje copiar PSTs Outlook tiene que estar cerrado | |
Do { | |
Write-Host "" |
View cambiar-descripcion-grupo-ad.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################################## | |
## RAUL UNZUE - ElBlogdeNegu | |
# Cambio nombre Grupo Directorio Activo | |
######################################## | |
# Saber el número de línea de un elemento | |
function linea | |
{$input | Select-String '.' | Select-Object LineNumber, Line} | |
# Ruta a la OU donde se generan los grupos por cada impresora |
View import-user-gpad.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
########################################## | |
## RAUL UNZUE - ELBLOGDENEGU | |
## CARGAR USUARIOS A GRUPOS DE IMPRESION | |
########################################## | |
Import-Csv "C:\Users\elblogdenegu\Desktop\usuariosad.csv" -Delimiter ';' | | |
ForEach-Object { | |
Add-ADGroupMember ` | |
-Identity $_.GrupoAD ` |
View wordpress-ansible.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# Entrada El Blog de Negu: https://www.maquinasvirtuales.eu/ansible-crear-pagina-web-wordpress/ | |
- name: Ansible Wordpress | |
hosts: wordpress | |
become: yes | |
vars: | |
wp_mysql_db: wordpress | |
wp_mysql_user: wp-admin | |
wp_mysql_password: elblogdenegu | |
wp_mysql_host: "{{ansible_default_ipv4.address}}" |
View powershell-consumo-app.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
######################### | |
## RAUL UNZUE - 31102020 | |
## CONSUMO APP - ELBLOGDENEGU | |
######################### | |
## LISTA DE SERVIDORES | |
$listaservers= (Get-Content C:\Users\runzue\Documents\SCRIPTS\servers.txt) | |
## CREDENCIALES DE CONEXION | |
$passwd = convertto-securestring -AsPlainText -Force -String "NUESTRAPASSWORD" | |
$cred = new-object -typename System.Management.Automation.PSCredential -argumentlist ('DOMINIO\USUARIO',$passwd) | |
## CONEXION A SERVIDORES |
NewerOlder