Skip to content

Instantly share code, notes, and snippets.

@n1snt
n1snt / Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md
Last active May 19, 2024 07:47
Oh my ZSH with zsh-autosuggestions zsh-syntax-highlighting zsh-fast-syntax-highlighting and zsh-autocomplete.md

Oh my zsh.

Oh My Zsh

Install ZSH.

sudo apt install zsh-autosuggestions zsh-syntax-highlighting zsh

Install Oh my ZSH.

@heyvoon
heyvoon / xrandr.sh
Last active June 18, 2018 11:22 — forked from chirag64/xrandr.sh
#!/bin/bash
#If no argument is specified, ask for it and exit
if [[ -z "$@" ]];
then
echo "An argument is needed to run this script";
exit
else
arg="$@"
#Basic check to make sure argument number is valid. If not, display error and exit
if [[ $(($(echo $arg | grep -o "\s" | wc --chars) / 2 )) -ne 2 ]];
@meoso
meoso / Example.com-Password-Expiration-Notifications.ps1
Last active May 18, 2024 01:22
PowerShell Active Directory Password Expiration Email Notification
#################################################################################################################
#
# Password-Expiration-Notifications v20220823
# Highly Modified fork. https://gist.github.com/meoso/3488ef8e9c77d2beccfd921f991faa64
#
# Originally from v1.4 @ https://gallery.technet.microsoft.com/Password-Expiry-Email-177c3e27
# https://windowspoweressentials.com/2017/02/21/powershell-password-reminder-script-updated/
# https://github.com/titlerequired/public
# Robert Pearman (WSSMB MVP)
# TitleRequired.com
@timsneath
timsneath / profile.ps1
Last active May 14, 2024 15:28
PowerShell template profile: adds some useful aliases and functions
### PowerShell template profile
### Version 1.03 - Tim Sneath <tim@sneath.org>
### From https://gist.github.com/timsneath/19867b12eee7fd5af2ba
###
### This file should be stored in $PROFILE.CurrentUserAllHosts
### If $PROFILE.CurrentUserAllHosts doesn't exist, you can make one with the following:
### PS> New-Item $PROFILE.CurrentUserAllHosts -ItemType File -Force
### This will create the file and the containing subdirectory if it doesn't already
###
### As a reminder, to enable unsigned script execution of local scripts on client Windows,
@heyvoon
heyvoon / DiscoverLastBootUpTime.ps1
Last active August 29, 2015 14:23
This script creates gets the LastBootUpDate from the PC and stores it on $LBT. Compares it with the specified variable $timeSpan and if LastBootUpTime is Less or Equal to the $timeSpan the PC is considered NON-COMPLIANT. This script is backward compatible with PowerShell 2.0!
# ------------------------------------------------------------------------
# NAME: DiscoverLastBootUpTime.ps1
# AUTHOR: Andre @ http://blog.teksoporte.es
# DATE:06/16/2015
#
# COMMENTS: This script creates gets the LastBootUpDate from the PC and
# stores it on $LBT. Compares it with the specified variable $timeSpan
# and if LastBootUpTime is Less or Equal to the $timeSpan the PC is
# considered NON-COMPLIANT.
# This script is backward compatible with PowerShell 2.0!
@heyvoon
heyvoon / RemediateRegImgPathVulnerability.ps1
Created May 19, 2015 13:22
This script will scan services ImgPath in the registry for # unquoted paths. Same script can be used to remediate by just changing # the variables below.
###########################################################################
#
# NAME: RemediateRegImgPathVulnerability.ps1
#
# AUTHOR: Teksoporte.es
# HOMEPAGE: http://blog.teksoporte.es
#
# COMMENT: This script will scan services ImgPath in the registry for
# unquoted paths. Same script can be used to remediate by just changing
# the variables below.
@heyvoon
heyvoon / DiscoverRegImgPathVulnerability.ps1
Created May 19, 2015 13:21
This script will scan services ImgPath in the registry for # unquoted paths. Same script can be used to remediate by just changing # the variables below.
###########################################################################
#
# NAME: DiscoverRegImgPathVulnerability.ps1
#
# AUTHOR: Teksoporte.es
# HOMEPAGE: http://blog.teksoporte.es
#
# COMMENT: This script will scan services ImgPath in the registry for
# unquoted paths. Same script can be used to remediate by just changing
# the variables below.
@heyvoon
heyvoon / DisableNetBiosOverTcpIp.ps1
Last active December 1, 2023 11:00
This script will scan through all enabled NICs and disable Netbios Over TCP/IP
###########################################################################
#
# NAME: DisableNetBiosOverTcpIp.ps1
#
# AUTHOR: aamaral
#
# COMMENT: This script will scan through all enabled NICs and disable Netbios Over TCP/IP
#
# VERSION HISTORY:
# 1.0 18/05/2015 - Initial release
@heyvoon
heyvoon / DiscoverNetBiosOverTcpIpSettings.ps1
Last active January 22, 2018 16:41
This script will scan through all the enabled NICs and discover # it's current setting. (0=Enabled, 1=Enabled, 2=Disabled)
###########################################################################
#
# NAME: DiscoverNetBiosOverTcpIpSettings.ps1
#
# AUTHOR: aamaral
#
# COMMENT: This script will scan through all the enabled NICs and discover
# it's current setting. (0=Enabled, 1=Enabled, 2=Disabled)
#
# VERSION HISTORY:
@heyvoon
heyvoon / Remediate_JavaAutoupdateIsOn.ps1
Created May 19, 2015 11:01
This script will disable automatic updates if it is enabled.
<#
This script will disable automatic updates if it is enabled.
Name: Remediate_JavaAutoupdateIsOn.ps1
Created: 16.05.2015
Version: 1.0
Author: Teksoporte.es
Homepage: http://blog.teksoporte.es
#>