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
# Version 1.7.0 | |
$gistUrl = "https://api.github.com/gists/81e7d1be5e7302c281ccc9b04134949e" | |
$gistFileName = '$profile' # Change this to match the filename in your Gist | |
$checkInterval = 4 # Check for updates every 4 hours | |
$updateCheckFile = [System.IO.Path]::Combine($HOME, ".profile_update_check") | |
$versionRegEx = "# Version (?<version>\d+\.\d+\.\d+)" | |
$localProfilePath = $Profile.CurrentUserCurrentHost | |
# Last update check timestamp |
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
# Jason Gomez - June 2024 | |
# Problem 1: When installing Vim for Windows using winget it's not added | |
# to $PATH so it cannot easily be used from the command line. | |
# Problem 2: The path to the Vim executables keeps changing as the | |
# version number is part of the path. | |
# Solution: This script makes a persistent symlink to the latest installed | |
# version of Vim for Windows and adds it to $PATH. Re-run the | |
# script when a new version of Vim is installed. | |
# Get all Vim directories and sort them by version number |
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
# PowerShell script to install scoop for multi-user and packages. | |
# If re-run when scoop is already installed, any additional packages | |
# are installed and shims are reset in order of the package list. | |
# I prefer to keep user and global packages as the same, so there's | |
# a minor inconvenience in some situations where packages will | |
# be listed twice with global commands. | |
# | |
# To avoid git ownership warnings, read this: | |
# https://stackoverflow.com/a/71904131/140872 | |
# git config --global --add safe.directory "*" (double quotes on Windows) |
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
#!/bin/bash -e | |
# This script installs or updates to the latest version of Go. | |
# Multi-platform (Linux and macOS) | |
# Multi-architecture (amd64, arm64, arm) support | |
# | |
# Add to your .profile, .bash_profile or .zshenv: | |
# export PATH=$PATH:/usr/local/go/bin | |
error_string=("Error: This command has to be run with superuser" |
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
#!/bin/bash | |
error_string=("Error: This command has to be run with superuser" | |
"privileges (under the root user on most systems).") | |
if [[ $(id -u) -ne 0 ]]; then echo "${error_string[@]}" >&2; exit 1; fi | |
eval "$(. /etc/os-release && typeset -p ID)" | |
if [[ $ID =~ ^(debian|ubuntu)$ ]]; then | |
pkg=deb | |
apt-get update |
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
#!/bin/bash | |
# Installs nginx from nginx repository (not distro repo) | |
# | |
# Usage: sudo ./install_nginx.sh [ --stable ] | |
# --stable option: Use stable channel instead of mainline | |
# | |
# Currently supported: | |
# RHEL | |
# CentOS |
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
#!/bin/bash | |
# Oracle firewall update script | |
# Usage: oci-fupdate [ <source-CIDR> ] [ --query ] | |
# | |
# Updates an existing Network Security Group to allow SSH access through the OCI | |
# firewall to reach instances in a public subnet, like bastion hosts. With no | |
# argument your current public IP address is used, or you can add a source address | |
# block in CIDR format. The --query option returns the current source address. | |
# |
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
{ | |
"settingsVersion": "1.67.4", | |
"exclusionRules": [ | |
{ | |
"pattern": "^https?://www.google.com/(?!maps)*", | |
"passKeys": "/abcdefhijklmnopqrsuvwyz" | |
}, | |
{ | |
"pattern": "^https?://mail.google.com/*", | |
"passKeys": "#/?cdegijklprsux" |
NewerOlder