Skip to content

Instantly share code, notes, and snippets.

const int LEDPin1 = 10; //red led
const int LEDPin2 = 9; // yellow led
const int LEDPin3 = 8; // green led
const int solenoidPin = 7;
const int buttonPin = 5;
bool started = false;
void setup() {
Serial.begin(9600); // Start serial communication
@todd814
todd814 / beta.ps
Last active January 31, 2020 21:03
# Simple ROBOCOPY backup script written by Todd DeBlieck
# Date: 1/31/2020
# Version: 0.1 1/31/2020
$user = [Environment]::UserName
Write-Host -ForegroundColor DarkCyan "File Migration Utility in PowerShell by Todd DeBlieck"
Write-Host "Hello" $user "Today is" (Get-Date).tostring("MM-dd-yy") "lets get started :)"
Write-Host -ForegroundColor Cyan "Initiating....."
Add-Type -AssemblyName System.Windows.Forms
@todd814
todd814 / dlfiles.py
Last active June 8, 2018 15:27
dl from web for files listed in csv in python change the chunk size for bigger faster dl's
import requests
import csv
url = "{yoururl/}"
#obtain files from CSV
with open('archived_files.csv') as csvfile:
readCSV = csv.reader(csvfile)
for row in readCSV:
filename = row[0]
import requests
import csv
url = "https://s3.amazonaws.com/files.leagueathletics.com/Images/Club/22395/"
chunk_size = 1024
bytes_transferred = 0
with open('archived_files.csv') as csvfile:
readCSV = csv.reader(csvfile, delimiter=',')
for row in readCSV:
filename = row[0]
@todd814
todd814 / Host_Validation.ps
Created April 13, 2016 14:39
Powershell Version Validation
if ($Host.Version.Major -lt 4) {
$architecture = (Get-WmiObject Win32_OperatingSystem -computername $env:COMPUTERNAME).OSArchitecture
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Drawing")
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms")
$objForm = New-Object System.Windows.Forms.Form
$objForm.Text = "Data Entry Form"
$objForm.Size = New-Object System.Drawing.Size(400,300)
$objForm.StartPosition = "CenterScreen"