softwareupdate --all --install --force
# Molecule managed | |
{% if item.registry is defined %} | |
FROM {{ item.registry.url }}/{{ item.image }} | |
{% else %} | |
FROM {{ item.image }} | |
{% endif %} | |
{% if item.env is defined %} | |
{% for var, value in item.env.items() %} |
Unless otherwise noted (either in this file or in a file's copyright section) the contents of this gist are Copyright ©️2020 by Christopher Allen, and are shared under spdx:Creative Commons Attribution Share Alike 4.0 International (CC-BY-SA-4.) open-source license.
If you more tips and advice like these, you can become a monthly patron on my GitHub Sponsor Page for as little as $5 a month; and your contributions will be multipled, as GitHub is matching the first $5,000! This gist is all about Homebrew, so if you like it you can support it by donating to them or becoming one of their Github Sponsors.
param ( | |
[ValidateScript({ | |
if (-Not ($_ | Test-Path) ) { throw "File does not exist" } | |
if (-Not ($_ | Test-Path -PathType Leaf) ) { throw "The Path argument must be a file. Folder paths are not allowed." } | |
if ($_ -notmatch "\.tfplan$") { throw "The file specified in the path argument must be type tfplan" } | |
return $true | |
})] | |
[System.IO.FileInfo] | |
$FilePath | |
) |
cat ~/.ssh/id_rsa.pub | ssh <USER_NAME>@<SERVER_NAME> "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys" |
#!/usr/bin/env bash | |
# The simplest way to push all branches to a remote repo: | |
git push --all <remote-name> |
$ uname -r
When hosting our web applications, we often have one public IP
address (i.e., an IP address visible to the outside world)
using which we want to host multiple web apps. For example, one
may wants to host three different web apps respectively for
example1.com
, example2.com
, and example1.com/images
on
the same machine using a single IP address.
How can we do that? Well, the good news is Internet browsers
Set-ExplorerOptions -showHiddenFilesFoldersDrives -showProtectedOSFiles -showFileExtensions | |
Enable-RemoteDesktop | |
cinst Chocolatey | |
cinst angryip | |
cinst autohotkey | |
cinst autohotkey | |
cinst checksum | |
cinst ChocolateyGUI | |
cinst cutepdf |
# Script found at https://www.autoitscript.com/forum/topic/174609-powershell-script-to-self-elevate/ | |
# Test if admin | |
function Test-IsAdmin() | |
{ | |
# Get the current ID and its security principal | |
$windowsID = [System.Security.Principal.WindowsIdentity]::GetCurrent() | |
$windowsPrincipal = new-object System.Security.Principal.WindowsPrincipal($windowsID) | |
# Get the Admin role security principal |