Skip to content

Instantly share code, notes, and snippets.

View prodriguezr's full-sized avatar

Pablo Rodríguez prodriguezr

  • Santiago de Chile
View GitHub Profile
@prodriguezr
prodriguezr / useForm.js
Last active February 13, 2023 18:26
Custom Hook for reactjs javascript project
/* How to implement?:
const initialForm = {
name: '',
email: '',
age: 0,
}
const [ formValues, handleInputChange, reset ] = useForm(initialForm);
@prodriguezr
prodriguezr / replFilesFolder.ps1
Created August 23, 2021 16:20
Replace text in multiple files in a folder with PowerShell
$filenames = @(get-childitem -Path "<Folder>\*.<Extension>" | % { $_.FullName })
foreach ($file in $filenames)
{
$replacementStr = '<Replacement string>'
(Get-Content $file) |
Foreach-object { $_ -replace '<String to relace>' , $replacementStr } |
Set-Content $file
Write-Host Processed $file
}