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
| CMD="get -b java.lang:type=Memory HeapMemoryUsage" | |
| echo $CMD | java -jar jmxterm-1.0-alpha-4-uber.jar -l localhost:1099 -n |
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
| #!/usr/bin/env ruby | |
| # | |
| # | |
| # | |
| @threads = [] | |
| 6.times do |i| | |
| @threads[i] = Thread.new do | |
| sum = 1 + rand(100) |
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
| #!/usr/bin/env ruby | |
| # | |
| # | |
| # | |
| require 'yaml' | |
| require 'fileutils' | |
| def create_config_file | |
| default_options = { | |
| "ruby_dir" => "#{ENV['HOME']}/rubies", |
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
| zabbix_sender -vv --config /etc/zabbix/zabbix_agentd.conf --host "Zabbix server" --key chatops.test.value --value 0 | |
| zabbix_sender -vv --config /etc/zabbix/zabbix_agentd.conf --host "Zabbix server" --key chatops.test.value --value 1 |
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
| $limit = (Get-Date).AddDays(-2) | |
| $path = "E:\SSP\AttachContent" | |
| # Delete files older than the $limit. | |
| Get-ChildItem -Path $path -Recurse -Force | Where-Object { !$_.PSIsContainer -and $_.CreationTime -lt $limit } | Remove-Item -Force | |
| # Delete any empty directories left behind after deleting the old files. | |
| Get-ChildItem -Path $path -Recurse -Force | Where-Object { $_.PSIsContainer -and (Get-ChildItem -Path $_.FullName -Recurse -Force | Where-Object { !$_.PSIsContainer }) -eq $null } | Remove-Item -Force -Recurse |
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
| /** | |
| * | |
| */ | |
| 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
| C:\Users\PD028300\Desktop\cem_sender (master) | |
| λ bundle exec ruby exe\cem_sender send "http://10.160.5.117/NextGenEMWeb/json/*/sendevent" "Farts and stuff" "{\"type\":\"ns0:ListOfEventAttributes\",\"EventAttribute\":[{\"attrname\":\"cer_impacted_asset\",\"attrvalue\":\"cesservername00.northamerica.cerner.net\"},{\"attrname\":\"mc_object\",\"attrvalue\":\"Test-Param-Instance\"},{\"attrname\":\"mc_parameter\",\"attrvalue\":\"TEST-PARAM\"},{\"attrname\":\"mc_parameter_value\",\"attrvalue\":\"5\"},{\"attrname\":\"severity\",\"attrvalue\":\"Average\"},{\"attrname\":\"cer_contact\",\"attrvalue\":\"csmzabbix\"},{\"attrname\":\"message\",\"attrvalue\":\"The JVM is being checked once a minute, and if the CPU is at 200% five times, then this trigger fires. \\\\nThe JVM is using a lot of CPU power, and could possibly be starving the server. \\\\n\\\\nView this screen for historical trends. \\\\n\\\\nhttp://corporatezabbix/zabbix/screens.php?ddreset=1\\&sid=448fd0a5c0d94068\\\\n\\\\nCEM_PARAM[TEST-PARAM]\"},{\"attrname\": |
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
| # | |
| # | |
| # | |
| import sys | |
| # Gets the Cell Name for the environment | |
| cell_name = AdminControl.getCell() | |
| # Node Name | |
| node_name = sys.argv[0] |
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
| /** | |
| * | |
| * | |
| */ | |
| package main | |
| import ( | |
| "fmt" | |
| "gopkg.in/yaml.v2" |
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
| package main | |
| import "fmt" | |
| func main() { | |
| // Initalize a Slice that holds Maps of strings | |
| slice_1 := make([]map[string]string, 0) | |
| // Initialize a Map of string keys and string values | |
| map_1 := make(map[string]string) | |
| // Assign a Key, key, and a value, farts |