Skip to content

Instantly share code, notes, and snippets.

@maldonadojuan
maldonadojuan / netboxInstall.sh
Created November 15, 2017 15:42
NetBoxInstallonUbuntu1604
###NetBox Install###
#update repos
sudo apt-get update
#install postgresql
sudo apt-get install -y postgresql libpq-dev
#go into sql with user postgres
sudo -u postgres psql
@maldonadojuan
maldonadojuan / wordpress1604install.txt
Created April 20, 2017 16:41
Wordpress1604install
Install for Wordpress on 16.04
---------------------------------------------------------------------------------------------------------
#wordpresspadmin password
wordpressAdminUserPassword
#MySQL root user password
mysqlrootpassword
@maldonadojuan
maldonadojuan / LAMP1604install.txt
Last active April 20, 2017 16:27
LAMP1604install
Install for LAMP on 16.04
#add wordpress admin user
sudo adduser wordpresspadmin
#wordpresspadmin password
wordpressAdminUserPassword
#add the word press admin to the sudo group
usermod -aG sudo wordpresspadmin
@maldonadojuan
maldonadojuan / checkFileForModifiedDate.ps1
Created April 4, 2017 14:57
This PowerShell script checks that a file has been modified on today's current date and sends an email with success or failure.
$filename = "C:\folder\file.TXT"
$success = "$filename has been modified today. The file is good."
$failure = "!!!ERROR!!! $filename has not been modified today. Server may have not received a file!!!"
if (Test-Path $filename) {
if ((Get-Item $filename).LastWriteTime -ge (Get-Date).Date) {
#Email success to admin
$transcript = $success
$transcript = $transcript | Out-String
@maldonadojuan
maldonadojuan / ARecordDNSAutomation.ps1
Last active December 2, 2016 22:13
This is a script that takes a CSV with a bunch of A record names and IP addresses and creates the A records along with the associated PTR records in DNS. This script assumes that you already have the appropriate Reverse Lookup Zones created in DNS.
Import-Csv C:\Scripts\Arecords.csv | foreach-object {
$ip = $_.ip
$name = $_.name
Add-DnsServerResourceRecordA -IPv4Address $ip -Name $name -ZoneName contoso.com -CreatePtr
}
#testing for checking vars
#Write-Host "$ipaddy,$name"
ipmo ActiveDirectory
$firstName = Read-Host 'First Name'
$lastName = Read-Host 'Last Name'
$phone = Read-Host 'Phone Number'
$purpose = Read-Host 'Purpose'
$path = "OU=Guest,OU=Users,DC=contoso,DC=com"
$date = Get-Date -format "MddHHmms"
$accountName = "g"+$date
$name = $firstName + " " + $lastName