Skip to content

Instantly share code, notes, and snippets.

@ionred
ionred / sql.sql
Last active October 9, 2023 06:42
ViewDuplication
USE CommonDB
GO
/*
USER DEFINED FUNCTION: getColumnNames
USE: PRIVATE/INTERNAL
AUTHOR: BDC 10/9/23
DESCRIPTION: This function returns a comma-separated list of column names for a given table and schema.
PARAMETERS:
- @schemaName: the name of the schema where the table is located.
- @tableName: the name of the table to retrieve column names from.
@ionred
ionred / gist:cb99efb1040070809f4dfc877e5b59fd
Last active October 7, 2022 01:45
BasicAppInstall.txt
# Description: Basic App Install
# Author: BC 2022-10-02
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Install-BoxstarterPackage -PackageName <URL-TO-RAW-GIST> -Credential (Get-Credential)
@ionred
ionred / boxstarter.ps1
Last active June 10, 2020 00:30 — forked from jessfraz/boxstarter.ps1
Boxstarter Commands for a new Windows box.
# Description: Boxstarter Script
# Author: Jess Frazelle <[email protected]>
# Last Updated: 2019-10-27 BC
#
# Install boxstarter:
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force
#
# You might need to set: Set-ExecutionPolicy RemoteSigned
#
# Run this boxstarter by calling the following from an **elevated** command-prompt:
@ionred
ionred / Update-AUPackages.md
Last active March 5, 2025 16:01
Update-AUPackages Report #powershell #chocolatey

Title: Update-AUPackages Time: 2025-03-05 16:00 AU version: 2022.10.24 AU packages: 3 LAST RUN HAD 3 errors !!!

Finished 3 packages after .11 minutes.
0 updated, 0 pushed, 0 ignored
3 errors - 3 update, 0 push.

@ionred
ionred / getIPRouteAdd.sh
Last active January 15, 2018 09:33
Gets Amazon & Netflix IP's to route traffic through a specific gateway to bypass VPN (Creates windows route add statement by default)
gatewayip=192.168.2.1
rm routeListtemp > /dev/null 2>&1
rm amazonCIDR > /dev/null 2>&1
rm routeList > /dev/null 2>&1
rm netflixip > /dev/null 2>&1
rm netflixCIDR > /dev/null 2>&1
rm arinunclean > /dev/null 2>&1
rm arinCIDR > /dev/null 2>&1
#cycle 3 times to make sure we get a good set of A records, Amazon ELB (Netflix host) only gives 8 a records per lookup
echo -en "Getting Netflix IP's from DNS Lookups...\t\t\t\t\t"