Skip to content

Instantly share code, notes, and snippets.

View silverl's full-sized avatar

Larry Silverman silverl

View GitHub Profile
if [type] == "apache-access" or [type] == "apache-error" {
geoip {
source => "clientip"
database => "/opt/logstash/vendor/geoip/GeoLiteCity.dat"
}
if [agent] != "-" {
useragent {
source => "agent"
target => "ua"
add_tag => [ "UA" ]
@silverl
silverl / SQLServerIndexMaintenance.ps1
Created December 28, 2016 15:32
Reworked version of Pieter Vanhove's Azure SQL Database reindexing Azure Automation Runbook
<#
.SYNOPSIS
Perform index maintenance
.DESCRIPTION
This runbook uses Azure Automation to perform reindexing and statistics maintenance of all databases on a target server.
As prerequisite, please create an Azure Automation credential asset that contains the username and password for the target Azure SQL DB logical server ($SqlServerName).
Make sure that you have installed the scripts IndexOptimize.sql and CommandExecute.sql of Ola Hallengren (https://ola.hallengren.com/downloads.html)
Make sure to get Ola's modified scripts which work on Azure here: https://ola.hallengren.com/downloads.html
@silverl
silverl / Boxstarter-DevRig.txt
Last active January 30, 2019 22:06
Boxstarter Basic Windows Workstation
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtension -EnableOpenFileExplorerToQuickAccess -EnableShowRecentFilesInQuickAccess -EnableShowFrequentFoldersInQuickAccess
Install-WindowsUpdate -acceptEula
Update-ExecutionPolicy RemoteSigned
Enable-MicrosoftUpdate
Enable-RemoteDesktop
Disable-InternetExplorerESC
Disable-GameBarTips
Disable-BingSearch
choco install visualstudio2017professional --package-parameters "--allWorkloads --includeRecommended --includeOptional --passive --locale en-US"
cinst 7zip
@silverl
silverl / cloudSettings
Created June 4, 2018 21:27
Visual Studio Code Settings Sync Gist
{"lastUpload":"2018-06-04T21:27:19.963Z","extensionVersion":"v2.9.2"}
@silverl
silverl / Support-Boxstarter.txt
Created January 30, 2019 23:17
Support-Boxstarter
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtension -EnableOpenFileExplorerToQuickAccess -EnableShowRecentFilesInQuickAccess -EnableShowFrequentFoldersInQuickAccess
Install-WindowsUpdate -acceptEula
Update-ExecutionPolicy RemoteSigned
Enable-MicrosoftUpdate
Enable-RemoteDesktop
Disable-InternetExplorerESC
Disable-GameBarTips
Disable-BingSearch
cinst 7zip
cinst github-desktop
@silverl
silverl / gist:ab2de651651dc15e6a2c3e9c6d80f147
Created February 26, 2019 15:52
Chocolatey Packages I Use
cinst visualstudio2017professional --package-parameters "--allWorkloads --includeRecommended --includeOptional --passive --locale en-US" -y
cinst 7zip -y
cinst autohotkey -y
cinst azcopy -y
cinst balsamiqmockups3 -y
cinst bind-toolsonly -y
cinst chefdk -y
cinst chocolateygui -y
cinst clink -y
cinst ConEmu -y
@silverl
silverl / download-nuget-licenses.ps1
Last active May 16, 2023 16:51 — forked from haacked/download-nuget-licenses.ps1
A PowerShell script to download your NuGet package licenses as first seen in http://haacked.com/archive/2015/03/28/download-nuget-package-licenses/
Split-Path -parent $dte.Solution.FileName | cd
New-Item -ItemType Directory -Force -Path ".\licenses"
@( Get-Project -All | ? { $_.ProjectName } | % { Get-Package -ProjectName $_.ProjectName } ) | Sort -Unique Id | % { $pkg = $_ ; Try { (New-Object System.Net.WebClient).DownloadFile($pkg.LicenseUrl, (Join-Path (pwd) 'licenses\') + $pkg.Id + ".html") } Catch [system.exception] { Write-Host "Could not download license for $($pkg.Id)" } }
@silverl
silverl / cVimrc
Last active April 18, 2020 14:00
let blacklists = ["https://mail.google.com/*","https://drive.google.com/*","https://mint.intuit.com/*","https://earth.google.com/*","https://calendar.google.com/*","https://www.youtube.com/*","https://play.google.com/*","https://home.sense.com/*","https://monitoring.solaredge.com/*","http://localhost/*","http://192.168.10.69/*","https://hass.lsilverman.com/*","https://hubs.mozilla.com/*"]
This is a test.
This is another test gist.