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
| #!/bin/bash | |
| # Upgrade Splunk on Ubuntu Server | |
| SPLUNK_DL=$( curl https://www.splunk.com/en_us/download/splunk-enterprise.html | grep ".deb" | grep data-filename ) | |
| sudo apt get update | |
| sudo apt-get upgrade --yes | |
| sudo --login --user splunk bash | |
| if [[ ! -v SPLUNK_VERSION ]]; then | |
| #SPLUNK_VERSION="9.1.2" |
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
| #!/bin/bash | |
| rw | |
| pacman -S certbot-dns-cloudflare | |
| kvmd-pstrun -- mkdir -p /var/lib/kvmd/pst/data/certbot/runroot | |
| kvmd-pstrun -- nano /var/lib/kvmd/pst/data/certbot/runroot/.cloudflare.auth | |
| # dns_cloudflare_email = <login email address> | |
| # dns_cloudflare_api_key = <API key to allow list of zones, read and change and change resource records> | |
| kvmd-pstrun -- chmod 600 /var/lib/kvmd/pst/data/certbot/runroot/.cloudflare.auth | |
| kvmd-certbot certonly \ | |
| --dns-cloudflare \ |
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 i in \ | |
| $(pip3 list --outdated | awk 'NR > 2 {print $1}') | |
| do | |
| pip3 install --upgrade $i --user | |
| done |
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
| $ServerName="servername" | |
| $fqdn=".domainname.id" | |
| Enable-PSRemoting | |
| set-item WSMan:\localhost\Client\TrustedHosts -Value "$ServerName$fqdn" | |
| New-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation\AllowFreshCredentials -Name 1 -PropertyType String -Value "wsman/$ServerName$fqdn" -Force | |
| New-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation\AllowFreshCredentialsWhenNTLMOnly -Name 1 -PropertyType String -Value "wsman/$ServerName$fqdn" -Force | |
| New-ItemProperty -Path HKLM:\SOFTWARE\Policies\Microsoft\Windows\CredentialsDelegation\AllowFreshCredentialsWhenNTLMOnly -Name 2 -PropertyType String -Value "wsman/*$fqdn" -Force | |
| New-ItemProperty -Path HKLM:\SYSTEM\CurrentControlSet\Control\Lsa\Credssp\PolicyDefaults\AllowDefaultCredentials -Name Hyper-V -PropertyType String -Value "Microsoft Virtual Console Service/*" -Force |
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
| # Windows / Ubuntu | |
| git clone --filter=blob:none --sparse git@github.com:ryanoasis/nerd-fonts | |
| cd nerd-fonts | |
| git sparse-checkout add patched-fonts/JetBrainsMono #https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/JetBrainsMono | |
| git sparse-checkout add patched-fonts/OpenDyslexic #https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/OpenDyslexic | |
| git sparse-checkout add patched-fonts/SourceCodePro #https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/SourceCodePro | |
| git sparse-checkout add patched-fonts/Meslo #https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/Meslo | |
| git sparse-checkout add patched-fonts/FiraCode #https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/FiraCode | |
| git sparse-checkout add patched-fonts/FiraMono #https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/FiraMono | |
| git sparse-checkout add patched-fonts/CascadiaCode #https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/CascadiaCode |
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
| # 2021-2023 | |
| #$uri = 'https://data.gov.au/data/dataset/b1bc6077-dadd-4f61-9f8c-002ab2cdff10/resource/33673aca-0857-42e5-b8f0-9981b4755686/download/australian-public-holidays-combined-2021-2023_33673aca-0857-42e5-b8f0-9981b4755686-updated.csv' | |
| # 2023 | |
| $uri = 'https://data.gov.au/data/dataset/b1bc6077-dadd-4f61-9f8c-002ab2cdff10/resource/d256f989-8f49-46eb-9770-1c6ee9bd2661/download/australian_public_holidays_2023.csv' | |
| $webrequest = Invoke-WebRequest -Uri $uri | |
| $resultobject = $webrequest.Content | ConvertFrom-Csv | |
| $outputObject = $resultobject | Select-Object @{Name="Date";Expression={'{0:dd/MM/yyyy}' -f $([DateTime]::ParseExact($_.Date, 'yyyyMMdd', $null))}},'Holiday Name', Information | |
| $outputObject | Format-Table -AutoSize |
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
| # Inspiration from https://twitter.com/mrhvid/status/929717169130176512 @mrhvid @Lee_Holmes | |
| function ResolveIp($IpAddress) { | |
| try { | |
| (Resolve-DnsName $IpAddress -QuickTimeout -ErrorAction SilentlyContinue).NameHost | |
| } catch { | |
| $null | |
| } | |
| } |
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
| $DateTimeNow = [datetime]::now | |
| $DateTimeYesterday = $DateTimeNow.AddDays(-1) | |
| $TeamsCreationTime = $(Get-ChildItem '/Applications/Microsoft Teams.app/').CreationTime | |
| $TeamsDownloadLink = "https://raw.githubusercontent.com/ItzLevvie/MicrosoftTeams-msinternal/master/defconfig" | |
| $TeamsAlreadyDownloaded = Test-Path ./Teams_osx.pkg | |
| if ($TeamsCreationTime -lt $DateTimeYesterday) { |
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
| # MAC OS | |
| brew tap ytsutano/toolbox | |
| brew install axmldec | |
| axmldec -o AndroidManifest_Decoded.xml -i AndroidManifest.xml | |
| brew uninstall axmldec | |
| brew untap ytsutano/toolbox |
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
| sw_vers | |
| # ProductName: macOS | |
| # ProductVersion: 12.3.1 | |
| # BuildVersion: 21E258 | |
| brew info python | |
| # python@3.9: stable 3.9.12 (bottled) | |
| # /opt/homebrew/opt/python@3.9/libexec/bin | |
| export PATH=/opt/homebrew/opt/python/libexec/bin:$PATH |
NewerOlder