Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am bbelchak on github.
  • I am bbelchak (https://keybase.io/bbelchak) on keybase.
  • I have a public key whose fingerprint is 7672 4817 FD32 F965 EE2D 55A2 83D2 98CC 612A 3B67

To claim this, I am signing this object:

@bbelchak
bbelchak / egress_cost.sql
Created June 6, 2017 11:11
How to get the cost of your Internet Egress in GCP
SELECT labels.key, labels.value, project.name, resource_type, start_time, end_time, SUM(cost) as cost FROM FLATTEN((
SELECT
*
FROM (
FLATTEN((
SELECT
*
FROM
[YOUR_TABLE_HERE]),
labels.key)

Keybase proof

I hereby claim:

  • I am bbelchak on github.
  • I am bbelchak (https://keybase.io/bbelchak) on keybase.
  • I have a public key ASAiNZwGxoKhgf4YyZLg5G06T9z82UpYR8rrZCBUHCtkdwo

To claim this, I am signing this object:

2013-03-18 23:02:41,981 | ERROR | dd.forwarder | transaction(transaction.py:180) |
Traceback (most recent call last):
File "/usr/share/datadog/agent/transaction.py", line 178, in flush_next
tr.flush()
File "/usr/bin/dd-forwarder", line 201, in flush
ca_certs=ssl_certificate
File "/usr/lib/pymodules/python2.7/tornado/httpclient.py", line 303, in __init__
self.body = utf8(body)
File "/usr/lib/pymodules/python2.7/tornado/escape.py", line 168, in utf8
assert isinstance(value, unicode)
===================
Forwarder (v 3.6.0)
===================
Status date: 2013-03-18 22:47:56 (2s ago)
Pid: 21211
Platform: Linux-3.2.0-27-virtual-i686-with-Ubuntu-12.04-precise
Python Version: 2.7.3
Logs: <stderr>, /var/log/datadog/forwarder.log, syslog:/dev/log
2013-03-18 18:04:00,552 | ERROR | dd.forwarder | transaction(transaction.py:180) |
Traceback (most recent call last):
File "/usr/share/datadog/agent/transaction.py", line 178, in flush_next
tr.flush()
File "/usr/bin/dd-forwarder", line 201, in flush
ca_certs=ssl_certificate
File "/usr/lib/pymodules/python2.7/tornado/httpclient.py", line 303, in __init__
self.body = utf8(body)
File "/usr/lib/pymodules/python2.7/tornado/escape.py", line 168, in utf8
assert isinstance(value, unicode)
#
# Author:: Adam Jacob (<adam@opscode.com>)
# Copyright:: Copyright (c) 2009 Opscode, Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
from urllib2 import *
from HTMLParser import HTMLParser
class Googleit(HTMLParser):
"""
Simple Python API to google. Returns a single numbered result from a search string.
Usage:
result = Googleit(term, number)
"""
{
"webserverPort": <%= @node[:core][:port] %>,
"simpleDbAccessKeyID" : "<%= @node[:core][:simpledb_access_key] %>",
"simpleDbSecretAccessKey" : "<%= @node[:core][:simpledb_secret_key] %>",
"configRoot" : "<%= @node[:core][:root_directory] %>",
"persistRoot" : "<%= @node[:core][:paths][:persist] %>",
"cityDbPath" : "<%= @node[:core][:paths][:geoip_city_db] %>",
"haystackServerHost" : "<%= @node[:core][:haystack_host] %>",
"haystackServerPort" : <%= @node[:core][:haystack_port] %>,
"partners" : [
/etc/chef/client.rb:29:in `from_file': undefined method `[]' for nil:NilClass (NoMethodError)
from /usr/lib/ruby/gems/1.8/gems/chef-0.8.16/bin/../lib/chef/application.rb:69:in `configure_chef'
from /usr/lib/ruby/gems/1.8/gems/chef-0.8.16/bin/../lib/chef/application.rb:54:in `reconfigure'
from /usr/lib/ruby/gems/1.8/gems/chef-0.8.16/bin/../lib/chef/application/client.rb:146:in `reconfigure'
from /usr/lib/ruby/gems/1.8/gems/chef-0.8.16/bin/../lib/chef/application.rb:60:in `run'
from /usr/lib/ruby/gems/1.8/gems/chef-0.8.16/bin/chef-client:26
from /usr/bin/chef-client:19:in `load'
from /usr/bin/chef-client:19