Skip to content

Instantly share code, notes, and snippets.

View nickadam's full-sized avatar

Nick Vissari nickadam

View GitHub Profile
@nickadam
nickadam / clamavminstall.sh
Created July 26, 2016 14:26
Install ClamAV minimal
#!/usr/bin/env bash
# Install clamav
apt-get update
apt-get -y install clamav clamav-daemon
# Exclude everything but /home/ and /tmp/
ls -d /*/ | grep -v "/home/" | grep -v "/tmp/" | sed 's/^/ExcludePath ^\//g' >> /etc/clamav/clamd.conf
# Update clam signatures
@nickadam
nickadam / keys.txt
Created August 23, 2016 11:35
Keys
//// left side
lctrl-low 12l lwin-low 4l lalt-low 15r space-low 15r caps-led+ 21l
lctrl-high 5r lwin-high 11l lalt-high 7l space-high 10l caps-res- 15l
lshft-low 4l z-low 14r x-low 14r c-low 14r v-low 14r b-low 16r
lshft-high 2l z-high 17r x-high 9l c-high 6r v-high 6l b-high 6l
capsl-low 4l a-low 13r s-low 13r d-low 13r f-low 13r g-low 15r
capsl-high 9l a-high 17r s-high 9l d-high 6r f-high 6l g-high 6l
tab-low 4l q-low 9r w-low 9r e-low 9r r-low 9r t-low 4l
tab-high 17r q-high 17r w-high 9l e-high 6r r-high 6l t-high 6l
@nickadam
nickadam / keybase.md
Created July 13, 2017 23:59
keybase.md

Keybase proof

I hereby claim:

  • I am nickadam on github.
  • I am nickadam (https://keybase.io/nickadam) on keybase.
  • I have a public key ASDWDGJwwBh6pkFBalte_kaTbu5k6yTgBUTDVxe8hn44gAo

To claim this, I am signing this object:

@nickadam
nickadam / docker-compose.yml
Last active March 25, 2019 10:18
Active-Passive Redis Cluster
version: '3.5'
services:
master:
image: redis:5
command: ["redis-server", "--appendonly", "yes"]
volumes:
- db:/data
ports:
- target: 6379
published: 6379
@nickadam
nickadam / Change_MAC_Address.md
Last active April 2, 2019 13:41
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
nickadam / Remove-MFA-ps1
Created April 8, 2019 14:24
Remove MFA from UPN
Connect-MsolService
Set-MsolUser -UserPrincipalName {upn} -StrongAuthenticationRequirements @()
@nickadam
nickadam / Get-ForwardRules.ps1
Last active April 8, 2019 18:25
Get all users forwardto or redirectto inbox rules
# 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
@nickadam
nickadam / my-minio.yml
Last active July 22, 2019 17:07
minio cluster
version: '3.5'
services:
minio1:
image: minio/minio:RELEASE.2019-07-17T22-54-12Z
hostname: minio1
volumes:
- minio1-data:/export
ports:
- target: 9000
published: 9009
function List-Acls {
param (
$Path,
$Depth
)
$Depth = $Depth - 1
Get-ChildItem $Path | ForEach-Object{
$FullName = $_.FullName
$FilePath = $_.FullName -replace "^[^$]+\$\\"
$FileOrFolder = "File"
@nickadam
nickadam / install_docker-ce.sh
Created July 31, 2019 11:26
Install docker-ce Ubuntu
#!/bin/bash
apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
apt-get update
apt-get install -y docker-ce docker-ce-cli containerd.io
curl -L "https://github.com/docker/compose/releases/download/1.24.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose