PowerShell modules, digital signatures, NuGet nuspec and packages
d-fens GmbH General-Guisan-Strasse 6 CH-6300 Zug Switzerland
| #Requires -Version 7 | |
| # Version 1.2.10 | |
| # check if newer version | |
| $gistUrl = "https://api.github.com/gists/a208d2bd924691bae7ec7904cab0bd8e" | |
| $latestVersionFile = [System.IO.Path]::Combine("$HOME",'.latest_profile_version') | |
| $versionRegEx = "# Version (?<version>\d+\.\d+\.\d+)" | |
| if ([System.IO.File]::Exists($latestVersionFile)) { |
| <# | |
| .SYNOPSIS | |
| Dynamic Multi-Platform PowerShell Profile Loader | |
| .DESCRIPTION | |
| Safe this script named 'profile.ps1' in either $PROFILE.AllUsersAllHosts or | |
| $PROFILE.CurrentUserAllHosts. | |
| (see: https://docs.microsoft.com/powershell/module/microsoft.powershell.core/about/about_profiles#the-profile-variable) | |
| It will automatically create a directory structure for every PS host | |
| application, platform and PowerShell edition you use and replicate itself as |
| { | |
| "Condition statement": { | |
| "prefix": "cond", | |
| "body": [ | |
| "${_} { ${0}; break }" | |
| ], | |
| "description": "Switch condition statement" | |
| }, | |
| "Condition single quoted string statement": { |
intdomain.tld - technical internal use extdomain.tld - technical external use internal.company.tld - nice looking internal names in accordance with company name to satisfy marketing aspects; should mostly be CNAMEs to intdomain.tld company.tld - nice looking names in accordance with company name to satisfy marketing aspects; should mostly be CNAMEs to extdomain.tld
| ########## | |
| # Tweaked Win10 Initial Setup Script | |
| # Primary Author: Disassembler <[email protected]> | |
| # Modified by: alirobe <[email protected]> based on my personal preferences. | |
| # Version: 2.12.1, 2018-03-15 | |
| # Primary Author Source: https://github.com/Disassembler0/Win10-Initial-Setup-Script | |
| # Tweaked Source: https://gist.github.com/alirobe/7f3b34ad89a159e6daa1/ | |
| # Tweak difference: | |
| # | |
| # @alirobe's version is a subset focused on safely disabling telemetry, some 'smart' features and 3rd party bloat ... |
| #!/bin/bash | |
| cat /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/gen/HomeKitTypes.js |grep "^Service."|grep -v UUID | cut -d "." -f 2 | cut -d " " -f 1 | uniq | sed ':a;N;$!ba;s/\n/,/g' | |
| echo " " | |
| cat /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/gen/HomeKitTypes.js |grep "^Characteristic."|grep -v UUID | cut -d "." -f 2 | cut -d " " -f 1 | uniq | sed ':a;N;$!ba;s/\n/,/g' |
| # macOS Sierra Public Beta | |
| sudo /usr/sbin/softwareupdate --set-catalog https://swscan.apple.com/content/catalogs/others/index-10.12beta-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz | |
| # or | |
| sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate CatalogURL https://swscan.apple.com/content/catalogs/others/index-10.12beta-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz | |
| # macOS Sierra Developer Beta | |
| sudo /usr/sbin/softwareupdate --set-catalog https://swscan.apple.com/content/catalogs/others/index-10.12seed-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz | |
| # or | |
| sudo defaults write /Library/Preferences/com.apple.SoftwareUpdate CatalogURL https://swscan.apple.com/content/catalogs/others/index-10.12seed-10.12-10.11-10.10-10.9-mountainlion-lion-snowleopard-leopard.merged-1.sucatalog.gz |
echo "\$ModLoad imudp" > /etc/rsyslog.d/server.conf
echo "\$UDPServerRun 514" >> /etc/rsyslog.d/server.conf
echo "\$ModLoad imtcp" >> /etc/rsyslog.d/server.conf
echo "\$InputTCPServerRun 514" >> /etc/rsyslog.d/server.conf
echo "\$PreserveFQDN on" >> /etc/rsyslog.d/server.conf
yum -y install rsyslog-gnutls rsyslog-mysql rsyslog-crypto
yum -y install epel-release
yum -y upgrade
yum -y install openssh-server net-tools iputils psmisc less which man mc bash-completion bash-completion-extras bash-argsparse bind-utils traceroute htop mtr
echo "export HISTTIMEFORMAT='%F %T '" > /etc/profile.d/history.sh
echo "export HISTIGNORE='ls -l:pwd:date:'" >> /etc/profile.d/history.sh
echo "export HISTCONTROL=ignoredups" >> /etc/profile.d/history.sh
systemctl enable sshd
systemctl start sshd