- RECOMPILE hints will cause the sproc to not show up in the DMV (Dynamic Management Views)
- DMVs and profiler will only catch perf issues for a window of time. They are passive tools that have to be running when the issue occurs
sp_Blitz
will look across a wider window of time.- ClearTrace as scriptable (and more powerful) version of SQL Server Profiler.
- Recommended practice is to create a Tools database to store scripts like ClearTrace and the BrentOzar scripts. May shops will not allow anything to be installed to master. Plus, master won't be restored typically during a rebuild
This file contains hidden or 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
// Parsing arbitrary JSON using interfaces in Go | |
// Demonstrates how to parse JSON with abritrary key names | |
// See https://blog.golang.org/json-and-go for more info on generic JSON parsing | |
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
) |
This file contains hidden or 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
function Set-ExitCodeAndExit { | |
[CmdletBinding(SupportsShouldProcess=$True,DefaultParameterSetName="None")] | |
PARAM( | |
[Parameter(Mandatory = $true, Position = 0, ValueFromPipeline = $true, ParameterSetName="p1")] | |
[int] | |
$ExitCode | |
) | |
Write-Verbose "Setting ExitCode to $($ExitCode) and exiting..." | |
# When a PowerShell script is called from a batch file or Command Prompt, this line allows a return code back to the calling shell | |
$host.SetShouldExit($ExitCode) |
This file contains hidden or 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
# | |
# INPUT - Logstash listens on port 8514 for these logs. | |
# | |
input { | |
udp { | |
port => "8514" | |
type => "syslog-cisco" | |
} | |
This file contains hidden or 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
# This is an example Makefile for quick package creation | |
# | |
# It uses FPM [1] to generate simple packages. | |
# - If you need more features or a greater quality package, use debian | |
# standard tools for packaging. | |
# - Do not use checkinstall. Use FPM instead. | |
# | |
# [1] (https://github.com/jordansissel/fpm/wiki) | |
# IMPORTANT: |
This file contains hidden or 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
--- | |
# Original idea found at http://stackoverflow.com/a/39083724 | |
# | |
# ansible -i inventory.ini add-ssh-keys.yml | |
# | |
- name: Store known hosts of 'all' the hosts in the inventory file | |
hosts: localhost | |
connection: local | |
vars: | |
ssh_known_hosts_command: "ssh-keyscan -T 10" |
My Elasticsearch cheatsheet with example usage via rest api (still a work-in-progress)
You may want a linter plugin to lint your code in Vim but you probably don't need it. At least try the built-in way before jumping on the plugin bandwagon.
autocmd FileType <filetype> setlocal makeprg=<external command>
This autocommand tells Vim to use <external command>
when invoking :make %
in a <filetype>
buffer. You can add as many similar lines as needed for other languages.
How to launch multiple QEMU based VM's that can communicate with the outside world and between each other other without any setup on the host.
This uses two features available in qemu
- User Mode Networking stack - SLIRP
- Socket networking backend allows you to create a network of guests that can see each other
This allows us to have