Disk space usage with human-readable format
df -h
Size of specific directory
du -sh /path/to/dir
[Legendary] Source: https://www.sslshopper.com/article-most-common-openssl-commands.html
Check a certifcate
openssl x509 -in <certificate.crt> -text -noout
| #!/bin/bash | |
| # author: | |
| # cmcginty https://stackoverflow.com/a/29997111/7742737 | |
| # example: | |
| # ./import-pem.sh TrustedCAs.PEM changeit truststore.jks | |
| PEM_FILE=$1 | |
| PASSWORD=$2 | |
| KEYSTORE=$3 |
git log $(git describe --tags --abbrev=0)..HEAD --pretty=format:"%s" -i -E --grep="Merge branch" --invert-grep
Reference
Based on https://github.com/git-lfs/git-lfs/wiki/Installation#rhelcentos
cat /etc/os-release
| # https://docs.microsoft.com/en-us/windows/client-management/mdm/policy-csp-browser#browser-allowinprivate | |
| # https://github.com/MicrosoftDocs/windows-itpro-docs/blob/master/browsers/edge/includes/allow-inprivate-browsing-include.md | |
| $path = 'HKLM:\SOFTWARE\Policies\Microsoft\MicrosoftEdge\Main' | |
| if (Test-Path $path) { | |
| New-ItemProperty -Path $path -Name AllowInPrivate -PropertyType DWORD -Value 0 -Force | |
| }else{ | |
| New-Item -Path $path -Force | | |
| New-ItemProperty -Name AllowInPrivate -PropertyType DWORD -Value 0 -Force |
| ############################################################################## | |
| $From = "[email protected]" | |
| $To = "[email protected]" | |
| $Cc = "[email protected]" | |
| #$Attachment = "C:\temp\Some file.txt" | |
| $Subject = "Email Subject" | |
| $Body = "Insert body text here" | |
| $SMTPServer = "smtp.gmail.com" | |
| $SMTPPort = "587" |
| # http://dev.chromium.org/administrators/policy-list-3#IncognitoModeAvailability | |
| $path = 'HKLM:\SOFTWARE\Policies\Google\Chrome' | |
| if (Test-Path $path) { | |
| New-ItemProperty -Path $path -Name IncognitoModeAvailability -PropertyType DWORD -Value 1 -Force | |
| }else{ | |
| New-Item -Path HKLM:\SOFTWARE\Policies\Google\Chrome\ -Force | | |
| New-ItemProperty -Name IncognitoModeAvailability -PropertyType DWORD -Value 1 -Force | |
| } |
| ## Get list of all AD Computer Objects | |
| #Get-ADComputer -filter * -Properties dnshostname,operatingsystem | sort Name | select Name,DNSHostName,OperatingSystem | |
| ## Export list of all AD Computer Objects inlcuding Ipv4Address property | |
| #Get-ADComputer -filter * -Properties dnshostname,operatingsystem,ipv4address | sort Name | select Name,DNSHostName,Ipv4Address,OperatingSystem | out-file C:\Users\david.urrutia\Desktop\computerIpList.txt | |
| ## Get list of all Windows Server computers | |
| #Get-ADComputer -filter {operatingsystem -like "*server*"} -Properties dnshostname,operatingsystem | sort Name | select Name,DNSHostName,OperatingSystem | |
| ## Get list of all Windows Server computers |