This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Logparser | |
############### | |
# Security Log | |
############### | |
# Find Event id | |
& 'C:\Program Files (x86)\Log Parser 2.2\LogParser.exe' -stats:OFF -i:EVT "SELECT * FROM 'Security.evtx' WHERE EventID = '5038'" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Security log | |
#============ | |
#### | |
#4624 - Logon & Logoff events successful | |
#4625 - Logon unsucceful | |
#### | |
# Get usernames | |
Get-WinEvent -path .\Security.evtx | Where {$_.id -eq "4624"} | Foreach {([xml]$_.ToXml()).GetElementsByTagName("Data").ItemOf(5)}| Select -ExpandProperty "#text" -Unique | |
# Get domains |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Rename-Item Function:\Prompt PoshGitPrompt -Force | |
function Prompt() {if(Test-Path Function:\PrePoshGitPrompt){++$global:poshScope; New-Item function:\script:Write-host -value "param([object] `$object, `$backgroundColor, `$foregroundColor, [switch] `$nonewline) " -Force | Out-Null;$private:p = PrePoshGitPrompt; if(--$global:poshScope -eq 0) {Remove-Item function:\Write-Host -Force}}PoshGitPrompt} | |
# Chocolatey profile | |
$ChocolateyProfile = "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" | |
if (Test-Path($ChocolateyProfile)) { | |
Import-Module "$ChocolateyProfile" | |
} | |
# Docker Module |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# See McAfee KBs: | |
# https://kc.mcafee.com/corporate/index?page=content&id=KB88461 # Remove ENS for Mac (ENSM) | |
# https://kc.mcafee.com/corporate/index?page=content&id=KB61125 # Remove McAfee Agent | |
# Exit upon failed command | |
# set -e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# for pair programming setup a user on your machine | |
#INPUT | |
USERNAME="tmuxpair" | |
# COMPUTE | |
LATEST_ID=$(dscl . -list /Users UniqueID | awk '{print $2}' | sort -ug | tail -1) | |
USER_ID=$((LATEST_ID+1)) | |
# CREATE with sudo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# SOURCES: | |
# https://gist.github.com/rubytester/7330557 | |
# http://stackoverflow.com/a/1923893 | |
# Exit upon failed command | |
# set -e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# SOURCES: | |
# https://gist.github.com/DylanTackoor/7a04052cfc3a726d9af6f798875189fc | |
# https://github.com/timsutton/osx-vm-templates/blob/ce8df8a7468faa7c5312444ece1b977c1b2f77a4/scripts/xcode-cli-tools.sh | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
# Exit upon failed command | |
# set -e |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:jessie | |
ENV USER=boatswain USER_ID=1000 USER_GID=1000 | |
# now creating user | |
RUN groupadd --gid "${USER_GID}" "${USER}" && \ | |
useradd \ | |
--uid ${USER_ID} \ | |
--gid ${USER_GID} \ | |
--create-home \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[filter "lfs"] | |
required = true | |
clean = git-lfs clean -- %f | |
smudge = git-lfs smudge -- %f | |
process = git-lfs filter-process | |
[user] | |
name = first last | |
email = address | |
[github] | |
user = username |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
# ┌ ┐ | |
# sources | |
# └ ┘ | |
https://gist.github.com/cloudRoutine/87c17655405cd8b1eac7 | |
https://gist.github.com/furzeface (not sure where profile.ps1 URL disappeared to) | |
#> | |
# If this script is throwing an error near a Unicode symbol try resaving the file as UTF-8 with BOM | |
$psmodules = ";~\Documents\WindowsPowerShell\Modules" |