Skip to content

Instantly share code, notes, and snippets.

@BAKMAH
BAKMAH / Sublime Text 3 Commands
Created August 18, 2016 19:16 — forked from danpe/Sublime Text 3 Commands
Sublime Text 3 Commands
A self made Sublime Text 3 Commands list.
build
run_macro_file
insert_snippet
insert
move
move_to
new_window
new_file
@BAKMAH
BAKMAH / Get-Traceroute.ps1
Created March 2, 2016 17:43 — forked from tylerapplebaum/Get-Traceroute.ps1
MTR for Powershell
<#
.SYNOPSIS
An MTR clone for PowerShell.
Written by Tyler Applebaum.
Version 1.5
.LINK
https://gist.github.com/tylerapplebaum/dc527a3bd875f11871e2
http://www.team-cymru.org/IP-ASN-mapping.html#dns
@BAKMAH
BAKMAH / Measure-Script
Created January 8, 2016 19:08 — forked from DavidSeptimus-Klotho/Measure-Script
Get execution time of current PowerShell ISE script
#Put this in your PowerShell.PowerShellISE_profile.ps1 file
function Measure-Script {
Write-Output (Measure-Command -Expression {$psISE.CurrentFile.Editor.Text})
}
New-Alias -Name mscript -Value "Measure-Script"
{
"template" : "logstash-*",
"settings" : {
"index.refresh_interval" : "5s"
},
"mappings" : {
"_default_" : {
"_all" : {"enabled" : true},
"dynamic_templates" : [ {
"string_fields" : {
@BAKMAH
BAKMAH / Windows Dashboard
Created December 10, 2015 14:10 — forked from mrlesmithjr/Windows Dashboard
Logstash Windows Dashboard
{
"title": "Windows",
"services": {
"query": {
"list": {
"0": {
"query": "*",
"alias": "",
"color": "#7EB26D",
"id": 0,
@BAKMAH
BAKMAH / Syslog Dashboard
Created December 10, 2015 14:10 — forked from mrlesmithjr/Syslog Dashboard
Logstash Syslog Dashboard
{
"title": "Syslog",
"services": {
"query": {
"list": {
"0": {
"query": "*",
"alias": "",
"color": "#7EB26D",
"id": 0,
@BAKMAH
BAKMAH / Nginx Dashboard
Created December 10, 2015 14:10 — forked from mrlesmithjr/Nginx Dashboard
Logstash Nginx Dashboard
{
"title": "Nginx",
"services": {
"query": {
"list": {
"0": {
"id": 0,
"color": "#7EB26D",
"alias": "Exclude from Top Page Requests",
"pin": false,
@BAKMAH
BAKMAH / IIS Dashboard
Created December 10, 2015 14:10 — forked from mrlesmithjr/IIS Dashboard
Logstash IIS Dashboard
{
"title": "IIS",
"services": {
"query": {
"list": {
"0": {
"query": "agent:MSIE",
"alias": "",
"color": "#806EB7",
"id": 0,
input {
file {
path => "/var/log/nginx/access.log"
type => "nginx-access"
sincedb_path => "/var/log/.nginxaccesssincedb"
}
}
input {
file {
path => "/var/log/nginx/error.log"
# Microsoft IIS logging....Use NXLOG for client side logging
filter {
if [type] == "iis" {
if [message] =~ "^#" {
drop {}
}
grok {
match => [
"message", "%{TIMESTAMP_ISO8601:logtime} %{IPORHOST:hostname} %{URIPROTO:cs_method} %{URIPATH:cs_stem} (?:%{NOTSPACE:cs_query}|-) %{NUMBER:src_port} %{NOTSPACE:cs_username} %{IP:clientip} %{NOTSPACE:cs_useragent} %{NUMBER:sc_status} %{NUMBER:sc_subresponse} %{NUMBER:sc_win32_status} %{NUMBER:timetaken}",
"message", "%{TIMESTAMP_ISO8601:logtime} %{IPORHOST:hostname} %{URIPROTO:cs_method} %{URIPATH:cs_stem} (?:%{NOTSPACE:cs_query}|-) %{NUMBER:src_port} %{NOTSPACE:cs_username} %{IP:clientip} %{NOTSPACE:cs_useragent} %{NOTSPACE:cs_referrer} %{NUMBER:sc_status} %{NUMBER:sc_subresponse} %{NUMBER:sc_win32_status} %{NUMBER:timetaken}"