517 karma · joined January 8, 2019
install_firefox() {
source /etc/os-release
printf "Package: snapd
Pin: release a=\*
Pin-Priority: -10" | sudo tee -a /etc/apt/preferences.d/nosnap.pref
sudo add-apt-repository -y ppa:mozillateam/ppa
sudo apt update -y
sudo apt install -y -t 'o=LP-PPA-mozillateam' firefox
printf "%s" "Unattended-Upgrade::Allowed-Origins:: \"LP-PPA-mozillateam:${UBUNTU_CODENAME}\";" | sudo tee /etc/apt/apt.conf.d/51unattended-upgrades-firefox
printf "Package: firefox\*
Pin: release o=LP-PPA-mozillateam
Pin-Priority: 501" | sudo tee /etc/apt/preferences.d/mozillateamppa
}
remove_snaps() {
sudo snap remove --purge firefox
sudo snap remove --purge snap-store
sudo snap remove --purge gnome-3-38-2004
sudo snap remove --purge gtk-common-themes
sudo snap remove --purge snapd-desktop-integration
sudo snap remove --purge bare
sudo snap remove --purge core20
sudo snap remove --purge snapd
sudo apt remove --autoremove snapd -y
cat <<EOF | sudo tee /etc/apt/preferences.d/nosnap.pref
# To prevent repository packages from triggering the installation of Snap,
# this file forbids snapd from being installed by APT.
# For more information: https://linuxmint-user-guide.readthedocs.io/en/latest/snap.html
Package: snapd
Pin: release a=*
Pin-Priority: -10
EOF
sudo umount /var/snap
}EDIT: also how do you not think that Ubuntu using kids won't go on to use this free tooling in the future? MS spends a ton to target the education market because they know that you can get kids hooked early you get easier wins.
The ForEach-Object cmdlet works much like the Foreach statement, except that you can't pipe input to a Foreach statement. For more information about the Foreach statement, see about_Foreach.
https://learn.microsoft.com/en-us/powershell/module/microsof...And another appears to be performance
PS /home/me> $time = (Measure-Command {
>> 1..1E4 | ForEach-Object {
>> $_
>> }
>> }).TotalMilliseconds
PS /home/me> [pscustomobject]@{
>> Type = 'ForEach-Object'
>> Time_ms = $Time
>> }
Type Time_ms
---- -------
ForEach-Object 144.558
PS /home/me> $Time = (Measure-Command {
>> ForEach ($i in (1..1E4)) {
>> $i
>> }
>> }).TotalMilliseconds
PS /home/me> [pscustomobject]@{
>> Type = 'ForEach_Statement'
>> Time_ms = $Time
>> }
Type Time_ms
---- -------
ForEach_Statement 17.621
https://devblogs.microsoft.com/scripting/getting-to-know-for...Installing the gnome alternative was one package and I killed X and started gnome-shell to test gsconnect it appears to pair and allow remote input from my phone to my PC and well enough, what doesn't work for you?
I certainly felt the hostility when I discovered the preloaded apps and ads in my Win11 install that aren't included in the much more expensive enterprise version.
dir itself is an alias for Get-ChildItem, but I don't know about -v (natural sort of version number)
Compare:
PS /home/me> {
>> $Env:MYSQL_HOST = "MyHost.com";
>> $Env:MYSQL_USER = "MyUser";
>> java -jar myprogram.jar;
>> }
$Env:MYSQL_HOST = "MyHost.com";
$Env:MYSQL_USER = "MyUser";
java -jar myprogram.jar;
PS /home/me> Invoke-Command -ScriptBlock {
>> $Env:MYSQL_HOST = "MyHost.com";
>> $Env:MYSQL_USER = "MyUser";
>> java -jar myprogram.jar;
>> }
Error: Unable to access jarfile myprogram.jar