This file contains 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
# Git | |
# https://github.com/git/git/blob/master/contrib/completion/git-completion.bash | |
source ~/Documents/Github/dotfiles/git-completion.bash | |
# AWS CLI | |
complete -C /usr/local/bin/aws_completer aws |
This file contains 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
[system.timezoneinfo]::GetSystemTimeZones() | Select Id, DisplayName |
This file contains 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
Get-ADUser -SearchBase "OU=AD Users,DC=example,DC=com" -Filter * -Properties msDS-UserPasswordExpiryTimeComputed, * | Sort Name | Select Name, Created, PasswordLastSet, @{Name="PasswordExpires";Expression={[datetime]::FromFileTime($_."msDS-UserPasswordExpiryTimeComputed")}}, PasswordExpired, PasswordNeverExpires, LockedOut, Enabled | Out-GridView |
This file contains 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
$size = 20Mb # Size in bits, eg 1Mb / 1Gb | |
$dest = 'Z:\Destination\' | |
fsutil file createnew "C:\temp\test.dat" ($size) | |
$Write = Measure-Command { Copy-Item "C:\temp\test.dat" "$dest\test.dat" } | |
$WriteMbps = [Math]::Round( (($size * 8) / $w.TotalSeconds) / 1Mb, 2 ) | |
rm "C:\temp\test.dat" |
This file contains 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
# Set proxy for all users | |
# See: | |
# https://www.securelink.be/windows-proxy-settings-explained/ | |
# https://technet.microsoft.com/en-us/library/cc770473(v=ws.11).aspx | |
# https://msdn.microsoft.com/en-us/library/windows/desktop/aa362813(v=vs.85).aspx | |
$domain_name='example.com' | |
$proxy='proxy.foo.com' | |
$port=8080 | |
$bypass = "10.*.*.*;" |
This file contains 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
Channel | Availability | Name | |
---|---|---|---|
7 | hd ondemand satellite | Shine TV | |
8 | hd ondemand | Television 33 | |
9 | hd ondemand satellite | TVNZ 1 | |
10 | hd ondemand satellite | TVNZ 2 | |
11 | hd ondemand satellite | Three | |
12 | hd ondemand satellite | Bravo | |
13 | hd ondemand satellite | Māori Television | |
18 | hd ondemand satellite | Parliament TV | |
20 | hd ondemand satellite | Te Reo |
This file contains 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
# https://duo.com/docs/radius | |
apt-get install build-essential libssl-dev python-dev libffi-dev | |
cd /tmp | |
wget -Oduoauthproxy-latest-src.tgz https://dl.duosecurity.com/duoauthproxy-latest-src.tgz | |
tar xzf duoauthproxy-latest-src.tgz | |
cd duoauthproxy-version-src | |
export PYTHON=python |
This file contains 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
$WUSession = New-Object -ComObject Microsoft.Update.Session | |
$WUSearcher = $WUSession.CreateUpdateSearcher() | |
$UpdateCollection = $WUSearcher.Search("IsInstalled=0 and Type='Software' and IsHidden=0") | |
$UpdateCollection.Updates | ft Title -AutoSize |
This file contains 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
function Recurse-PolicyKeys { | |
[CmdletBinding()] | |
param( | |
[Parameter(Mandatory=$true)] | |
[string]$GPOName, | |
[Parameter(Mandatory=$false)] | |
[string]$Key=“HKLM\Software” | |
) | |
$current = Get-GPRegistryValue -Name $gpoName -Key $key |
This file contains 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
<# | |
.SYNOPSIS | |
Set the state of a basic GPO setting | |
.DESCRIPTION | |
A Basic GPO setting has three possible states: | |
- Not Configured: The value is not present in the registry | |
- Enabled: The REG-DWORD is set to 0x00000001 (1) | |
- Disabled: The REG-DWORD is set to 0x00000000 (0) |