Skip to content

Instantly share code, notes, and snippets.

@dgtm
dgtm / telegraph.conf
Last active October 25, 2023 16:44
telegraf.conf
# Telegraf Configuration
#
# Telegraf is entirely plugin driven. All metrics are gathered from the
# declared inputs, and sent to the declared outputs.
#
# Plugins must be declared in here to be active.
# To deactivate a plugin, comment out the name and any variables.
#
# Use 'telegraf -config telegraf.conf -test' to see what metrics a config
# file would generate.
# Telegraf Configuration
#
# Telegraf is entirely plugin driven. All metrics are gathered from the
# declared inputs, and sent to the declared outputs.
#
# Plugins must be declared in here to be active.
# To deactivate a plugin, comment out the name and any variables.
#
# Use 'telegraf -config telegraf.conf -test' to see what metrics a config
# file would generate.
@dgtm
dgtm / cffile
Created September 9, 2021 11:46
AWSTemplateFormatVersion: 2010-09-09
Resources:
AWSCURDatabase:
Type: 'AWS::Glue::Database'
Properties:
DatabaseInput:
Name: 'athenacurcfn_myreport'
CatalogId: !Ref AWS::AccountId
cfn-init --stack asds --resource bbbInstance --configsets full_install --region us-east-1
+ cfn-init --stack asds --resource bbbInstance --configsets full_install --region us-east-1
Cloud-init v. 20.2-45-g5f7825e2-0ubuntu1~16.04.1 running 'modules:final' at Mon, 17 May 2021 21:16:42 +0000. Up 30.32 seconds.
2021-05-17 21:17:19,013 - util.py[WARNING]: Failed running /var/lib/cloud/instance/scripts/part-001 [1]
2021-05-17 21:17:19,015 - cc_scripts_user.py[WARNING]: Failed to run module scripts-user (scripts in /var/lib/cloud/instance/scripts)
2021-05-17 21:17:19,016 - util.py[WARNING]: Running module scripts-user (<module 'cloudinit.config.cc_scripts_user' from '/usr/lib/python3/dist-packages/cloudinit/config/cc_scripts_user.py'>) failed
Cloud-init v. 20.2-45-g5f7825e2-0ubuntu1~16.04.1 finished at Mon, 17 May 2021 21:17:19 +0000. Datasource DataSourceEc2Local. Up 66.92 seconds
class LocalCampaign
attr_accessor :id, :job_id, :status, :external_reference, :ad_description, :discrepancies
def self.remote_mappings
{
external_reference: :external_reference,
ad_description: :ad_description
}
end
def eql?(remote_campaign)
["4594714", "4594748", "4640870", "5039844", "4927195", "4875215", "4880288", "4913834", "5207189", "5155944", "5000751", "5104034", "5355968", "4937012", "4936981", "5054076", "5425321", "5088219", "5011313", "5029527", "5040905", "5192641", "5157289", "5158951", "5327093", "5399195", "5273665", "5254688", "5259247", "5407348", "5252338", "5318855", "5459002", "5398973", "5336686", "5337263", "5348984", "5361228", "5383595", "5401848", "5422157", "5436597", "5475904", "8091", "45049", "847755", "2674468", "8757", "13984", "3415236", "4003229", "9028", "33501", "57337", "9224", "11582", "2806973", "612297", "13615", "10961", "3779741", "21506", "82642", "16374", "10189", "15424", "14347", "14461", "2590786", "3619008", "335899", "31426", "10014", "10805", "10039", "10101", "11790", "1499017", "11261", "56702", "464713", "570213", "1405286", "16874", "4163794", "12215", "4280118", "41889", "15585", "12452", "35914", "12089", "3213040", "2754106", "12474", "12267", "12431", "261793", "851021", "13639", "12682",
{"0010X000045gSQqQAM"=>["4594596", "4594714", "4594748"],
"0010X000045h8B7QAI"=>["166075", "4640870"],
"0010X000045hMwCQAU"=>["4662181", "5039844"],
"0010X000045i3aBQAQ"=>["4706822", "4927195"],
"0010X000045iOABQA2"=>["4733508", "4875215"],
"0010X000047d1TqQAI"=>["4776025", "4880288"],
"0010X000047dGaEQAU"=>["4801072", "4913834"],
"0010X000047egzDQAQ"=>["4873664", "5207189"],
"0010X000047erU6QAI"=>["4882589", "5155944"],
"0010X000047eY8bQAE"=>["4862993", "5000751"],
Tooltip = (a) ->
@setValues a
b = @div_ = document.createElement("div")
b.style.position = "absolute"
b.style.zIndex = "999"
b.className = "tooltip"
@draw = ->
@add_ = add_
@remove_ = remove_
@dgtm
dgtm / Alert Ignition
Last active August 29, 2015 14:06
Alert Ignition
# !/usr/local/bin/ruby
require 'rubygems'
require 'json'
require 'httparty'
# Change modem_id at your will
modem = "MO-2"
lat = -119.7579390625
lon = 36.1208411143
# Change the seconds value (24 here) every time you run this
@dgtm
dgtm / gist:5617866
Created May 21, 2013 06:29
hello test
this is my first test with gist...