Skip to content

Instantly share code, notes, and snippets.

View eguyd's full-sized avatar
🏠
Working from home

GuyD008 eguyd

🏠
Working from home
  • Tollgate
  • San Diego
View GitHub Profile
@eguyd
eguyd / VM_DEPLOYMENT.ps1
Created June 11, 2019 15:56
VM Deployement using HyperV
$vSwitch = "Deployment Test"
$VHDXPath = "D:\Hyper-V\Virtual hard disks\VHDXPath\"
$SubMaskBit = "24"
#DOMAIN CONTROLLER SETTINGS
$DCVMName = "TEST-DC01"
$DCIP = "10.0.0.50"
$DomainMode = "WinThreshold"
$ForestMode = "WinThreshold"
$DomainName = "TestDomain.local"
@eguyd
eguyd / NLB_Cluster_Deployment.ps1
Created June 16, 2019 01:18
Implement Windows Server 2016 Load Balancing.
#
#AUTHOR: Guy Derenoncourt
#PROGRAM: Script to create a NLB-cluster.
#
#This Sample Code is provided for the purpose of illustration "AS IS" WITHOUT WARRANTY OF ANY KIND.
#
#
###########################################################################
#Set IP for NLB | YOU can change the IP to your desired CLASS
Write-Host "Set NLB IP and change Network adapter" -ForegroundColor yellow
@eguyd
eguyd / AD_addUser.ps1
Created June 16, 2019 03:21
Addd users to AD using CSV bulk upload.
#
#AUTHOR: Guy Derenoncourt
#PROGRAM: MANAGE AD USER WIN SERVER 2016
#
#This Sample Code is provided for the purpose of illustration "AS IS" WITHOUT WARRANTY OF ANY KIND.
#
#
###########################################################################
#
#
@eguyd
eguyd / configDHCP.ps1
Created June 17, 2019 16:48
Configure DHCP with PowerShell. Include scope and routing.
# Author: Guy Derenoncourt
# Program: DHCP Configuration with PowerShell
# Date Modified: 6/17/19
# Disclaimer: This script is provided "AS IS" with no warranties
#>
# CONFIGURATION
DNSServerIP="10.0.0.10"
DHCPServerIP="10.0.0.10"
StartRange="10.0.0.50"
EndRange="10.0.0.254"
@eguyd
eguyd / binarytodecimal.py
Created June 22, 2019 21:19
Convert binary to decimal
"""
File: binarytodecimal.py
Converts a string of bits to a decimal
"""
bitString = input("ENTER A STRING OF BITS: ")
decimal = 0
exponent = len(bitString) - 1
for digit in bitString:
decimal = decimal + int(digit) * 2 ** exponent
exponent = exponent - 1
@eguyd
eguyd / decimaltobinary.py
Created June 22, 2019 21:20
Convert Decimal to binary
decimal = int(input("ENTER A DECIMAL INT: "))
if decimal == 0:
print(0)
else:
print("QUOTIENT REMAINDER BINARY")
bitString = ""
while decimal > 0:
remainder = decimal % 2
decimal = decimal // 2
bitString = str(remainder) + bitString
##############################
# Author: Guy D. #
# Last Day Modified: 6/23/19 #
##############################
""" Write a program that allows the user to navigate the lines of text in a file. The
program should prompt the user for a filename and input the lines of text into a
list. The program then enters a loop in which it prints the number of lines in the
file and prompts the user for a line number. Actual line numbers range from 1 to
the number of lines in the file. If the input is 0, the program quits. Otherwise, the
@eguyd
eguyd / Ch5_Ex6.py
Last active November 12, 2020 02:56
A main function that tests the conversion function with numbers in several bases.
"""
Define a function decimalToRep that returns the representation of an integer in a
given base. The two arguments should be the integer and the base. The function
should return a string. It should use a lookup table that associates integers with
digits. Include a main function that tests the conversion function with numbers
in several bases.
"""
@eguyd
eguyd / ICMP.py
Created July 31, 2019 20:06
Scan an entire IPv4 subnet with Python using ICMP ECHO request to identify live hosts.
"""
Author: Guy D.
Last Modified: 31 JUL 19
Program: Scan an entire subnet with Python using ICMP ECHO request to view live hosts.
This sample code is provided for the purpose of illustration "AS IS" WITHOUT WARRANTY OF ANY KIND.
"""
import os
import platform
@eguyd
eguyd / NASDAQNews.py
Last active August 3, 2019 01:16
natural language processing algorithms to identify sentiments in market.
import requests
from bs4 import BeautifulSoup
import csv
import pandas as pd
mostActiveStocksUrl = "https://www.nasdaq.com/markets/most-active.aspx"
r = requests.get(mostActiveStocksUrl)
data = r.text
soup = BeautifulSoup(data)