Skip to content

Instantly share code, notes, and snippets.

Nick Vissari nickadam

  • Elkridge, MD
Block or report user

Report or block nickadam

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
nickadam /
Created Jul 31, 2019
Install docker-ce Ubuntu
apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL | apt-key add -
add-apt-repository "deb [arch=amd64] $(lsb_release -cs) stable"
apt-get update
apt-get install -y docker-ce docker-ce-cli
curl -L "$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
View List-Acls.ps1
function List-Acls {
param (
$Depth = $Depth - 1
Get-ChildItem $Path | ForEach-Object{
$FullName = $_.FullName
$FilePath = $_.FullName -replace "^[^$]+\$\\"
$FileOrFolder = "File"
nickadam /
Created Jun 12, 2019
Copy a docker swarm secret between two clusters
#!/usr/bin/env bash
secret=$(ssh $1 "docker service create --restart-condition=none --name copy_secret --secret $3 -d alpine cat /run/secrets/$3 >/dev/null; sleep $SLEEP; docker service logs --raw copy_secret; docker service rm copy_secret>/dev/null")
secret=$(echo "$secret" | sed ':a;N;$!ba;s/\n/\\n/g' | sed ':a;N;$!ba;s/ /\\ /g')
nickadam / my-minio.yml
Last active Jul 22, 2019
minio cluster
View my-minio.yml
version: '3.5'
image: minio/minio:RELEASE.2019-07-17T22-54-12Z
hostname: minio1
- minio1-data:/export
- target: 9000
published: 9009
nickadam / Remove-MFA-ps1
Created Apr 8, 2019
Remove MFA from UPN
View Remove-MFA-ps1
Set-MsolUser -UserPrincipalName {upn} -StrongAuthenticationRequirements @()
nickadam / Change-MACAddress.ps1
Created Apr 2, 2019
Change MAC Address Windows
View Change-MACAddress.ps1
# credit to
function random-mac {
$mac = "02"
while ($mac.length -lt 12)
$mac += "{0:X}" -f $(get-random -min 0 -max 16)
$Delimiter = "-"
for ($i = 0 ; $i -le 10 ; $i += 2)
nickadam /
Last active Apr 2, 2019
Change MAC Address macOS

generate random mac

openssl rand -hex 6 | sed 's/\(..\)/\1:/g; s/.$//'

apply it

sudo ifconfig en0 ether 34:f1:77:82:ce:be

nickadam / docker-compose.yml
Last active Mar 25, 2019
Active-Passive Redis Cluster
View docker-compose.yml
version: '3.5'
image: redis:5
command: ["redis-server", "--appendonly", "yes"]
- db:/data
- target: 6379
published: 6379
nickadam / Get-ForwardRules.ps1
Last active Apr 8, 2019
Get all users forwardto or redirectto inbox rules
View Get-ForwardRules.ps1
# evidently there is an entirely different area in o365 where you can do the same thing as an inbox rule but it's not an inbox rule
# Get-Mailbox -ResultSize Unlimited | select WindowsEmailAddress,AccountDisabled,DeliverToMailboxAndForward,ForwardingAddress,ForwardingSmtpAddress | Export-Csv -NoTypeInformation Forward.csv
# get msol creds for reconnecting
$creds = Get-Credential
# First get a list of all users from on prem AD so it doesn't time out
Get-ADUser -Properties emailaddress -Filter {(Enabled -eq $True) -and (ProxyAddresses -like 'SMTP*')} | Export-Csv -NoTypeInformation Users.csv
# write the header

Keybase proof

I hereby claim:

  • I am nickadam on github.
  • I am nickadam ( on keybase.
  • I have a public key ASDWDGJwwBh6pkFBalte_kaTbu5k6yTgBUTDVxe8hn44gAo

To claim this, I am signing this object:

You can’t perform that action at this time.