Skip to content

Instantly share code, notes, and snippets.

View rbuzzell's full-sized avatar
:octocat:
I may be slow to respond.

Ryan Buzzell rbuzzell

:octocat:
I may be slow to respond.
View GitHub Profile
#!/bin/bash
# Functions
doBind(){
echo "Attempting AD bind"
ntpdate -u ad.domain.fqdn
dsconfigad -a "$(scutil --get ComputerName | cut -c1-15) -u $bindServiveAccount -p "$password" -localhome anable -useundpath disable -alldomains enable -groups "$adminGroupHere" -mobile enable -mobildconfirm disable -doman ad.domain.fqdn -force -passinterval 0 -ou "OU=Path,OU=To,OU=OU,OU=In,DC=ad,DC=domain,DC=fqdn"
}
# Remove existing object to remove bind conflicts on local machine
@rbuzzell
rbuzzell / portLister
Created January 11, 2013 16:08
I needed a quick way to generate a port number range for windows firewall. This did the trick. Contains no error checking.
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
//Declare Variables
int startPort = 0;
int endPort = 0;
size_t numSets;