Skip to content

Instantly share code, notes, and snippets.

@rcarvalhoxavier
rcarvalhoxavier / esphome-base.yaml
Last active July 11, 2022 06:07
ESP8266 base configuration
substitutions:
device_name: <device-name-without-spaces>
device_ip: <any-ip-from-your-network>
esphome:
name: ${device_name}
platform: ESP8266
board: esp12e
wifi:
#
# Example .\copy-content.ps1 C:\Users\rcarvalhoxavier\files\ csv C:\Users\rcarvalhoxavier\files\unified\file.csv
#
param (
[Parameter(Mandatory=$true)][string] $path,
[Parameter(Mandatory=$true)][string] $extension,
[Parameter(Mandatory=$true)][string] $pathNewFile
)
@rcarvalhoxavier
rcarvalhoxavier / net_group_resume.ps1
Last active March 14, 2019 15:03
Returns comment's value and groups name value concatenated with ';' for csv
#
# Exemplo de comando .\group_resume.ps1 s-gsd-mestides-rp | Out-File -Append grupos.csv
#
#
param (
[Parameter(Mandatory=$true)]
[string] $Group
)
@rcarvalhoxavier
rcarvalhoxavier / MaintainService.ps1
Created January 15, 2018 11:21
Maintain Windows Service Powershell - Stop, Start, Restart, Check
<#
Author: Khoa Nguyen
Sample Executions:
PS C:\Users\KoA\Dropbox\Code-Store\powershell> .\MaintainService.ps1 Spooler Start
PS C:\Users\KoA\Dropbox\Code-Store\powershell> .\MaintainService.ps1 Spooler Stop
PS C:\Users\KoA\Dropbox\Code-Store\powershell> .\MaintainService.ps1 Spooler Restart
PS C:\Users\KoA\Dropbox\Code-Store\powershell> .\MaintainService.ps1 Spooler Check