Skip to content

Instantly share code, notes, and snippets.

View pglombardo's full-sized avatar
🕶️

Peter Giacomo Lombardo pglombardo

🕶️
View GitHub Profile
@pglombardo
pglombardo / x.txt
Created March 4, 2019 10:11
2017 MacBook Pro Crashing on Sleep
Anonymous UUID: 8DD42072-72D6-4761-9A18-9AC8503B209D
Mon Mar 4 11:08:04 2019
*** Panic Report ***
panic(cpu 0 caller 0xffffff7f9aeebcd9): "Failed to complete supporting devices sleep/wake\n"@/Library/Caches/com.apple.xbs/Sources/AppleEmbeddedOSSupport/AppleEmbeddedOSSupport-59.60.8/Source/Drivers/AppleEmbeddedOSSupportHost/AppleEmbeddedOSSupportHost.cpp:460
Backtrace (CPU 0), Frame : Return Address
0xffffff921808be50 : 0xffffff8017ee956c
0xffffff921808bed0 : 0xffffff7f9aeebcd9
0xffffff921808bf00 : 0xffffff8017f2202a
@pglombardo
pglombardo / myfalcon.py
Created July 24, 2018 06:40
Falcon app with Instana WSGI middleware
import falcon
import instana
from instana.wsgi import iWSGIMiddleware
instana.service_name = "Falcon_Service"
# Falcon follows the REST architectural style, meaning (among
# other things) that you think in terms of resources and state
# transitions, which map to HTTP verbs.
@pglombardo
pglombardo / mycherry.py
Last active February 14, 2018 12:27
Adding Instana WSGI middleware to a CherryPy application
import cherrypy
import instana
from instana.wsgi import iWSGIMiddleware
# My CherryPy application
class Root(object):
@cherrypy.expose
def index(self):
return "hello world"
#!/usr/bin/env python
import instana
import tornado.httpserver
import tornado.ioloop
import tornado.web
import opentracing
import opentracing.ext.tags as tags
import logging
instana.service_name = "Tornado 🌪"
#!/usr/bin/env python
import datetime
from functools import wraps
import instana
import tornado.httpserver
import tornado.ioloop
import tornado.ioloop
import tornado.web
import tornado.web
@pglombardo
pglombardo / pwpush.rb
Last active July 26, 2017 19:14
PasswordPusher Alfred Workflow: Configurable days/views
#!/usr/bin/env ruby
require "net/http"
require "uri"
require "json"
uri = URI.parse("https://pwpush.com/p.json")
data = {}
data["password[payload]"] = "{query}"
@pglombardo
pglombardo / Gemfile
Last active November 24, 2016 16:23
Instana Test Trace Generation Script
# frozen_string_literal: true
source "https://rubygems.org"
gem "instana"
@pglombardo
pglombardo / traceview.yml
Last active June 30, 2016 20:59
Proposed Ruby config file instrumentation syntax
Array#sort:
# Whether to start a new trace
#
# default: false
start_trace: false
# For potentially recursive operations, report only the
# outermost call
#
# default: false
@pglombardo
pglombardo / error.rb
Created December 9, 2015 16:49
TraceView gem + bson v4 gem error
NoMethodError: NoMethodError: undefined method `get_int32' for #<StringIO:0x007f9e20499498>
/home/pglombardo/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bson-4.0.0/lib/bson/hash.rb:77:in `from_bson'
/home/pglombardo/Projects/ruby-traceview/lib/oboe_metal.rb:83:in `get_all_traces'
/home/pglombardo/Projects/ruby-traceview/test/minitest_helper.rb:94:in `get_all_traces'
/home/pglombardo/Projects/ruby-traceview/test/instrumentation/delayed_job-client_test.rb:33:in `test_delay'
/home/pglombardo/.rbenv/versions/2.2.3/lib/ruby/gems/2.2.0/gems/bson-4.0.0/lib/bson/hash.rb:77:in `from_bson'
/home/pglombardo/Projects/ruby-traceview/lib/oboe_metal.rb:83:in `get_all_traces'
/home/pglombardo/Projects/ruby-traceview/test/minitest_helper.rb:94:in `get_all_traces'
/home/pglombardo/Projects/ruby-traceview/test/instrumentation/delayed_job-client_test.rb:33:in `test_delay'
@pglombardo
pglombardo / sidekiqer.rb
Last active September 1, 2015 14:51 — forked from cpuguy83/sidekiqer.rb
Run Sidekiq in your main process
require 'sidekiq/cli'
require 'sidekiq/launcher'
module Sidekiqer
Sidekiq = ::Sidekiq.dup
module Sidekiq
CLI = ::Sidekiq::CLI.dup
Launcher = ::Sidekiq::Launcher.dup
::Sidekiq.send(:remove_const, :CLI)