Skip to content

Instantly share code, notes, and snippets.

@owais
owais / last-skype-chat
Created November 8, 2011 17:38
Skype recent chat hotkey for linux
#!/usr/bin/env python
import dbus
PLUGIN_NAME = "OpenLastSkypeChat"
bus = dbus.SessionBus()
skype_dbus_object = bus.get_object('com.Skype.API', '/com/Skype')
skype = dbus.Interface(skype_dbus_object, dbus_interface='com.Skype.API')
@owais
owais / gist:1759658
Created February 7, 2012 13:24
GtkClutter PyGobject
from gi.repository import Gtk, Clutter, GtkClutter
def pressed(w, e):
print w, e
GtkClutter.init([])
window = Gtk.Window.new(Gtk.WindowType.TOPLEVEL)
vbox = Gtk.VBox.new(False, 6)
window.add(vbox)
@owais
owais / keybase.md
Last active September 20, 2016 08:47
keybase.md

Keybase proof

I hereby claim:

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

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am owais on github.
  • I am owais (https://keybase.io/owais) on keybase.
  • I have a public key whose fingerprint is 6EF9 E833 BA38 147B 2B98 D8E6 68B6 A58A BF0C 299C

To claim this, I am signing this object:

Effective Engineer - Notes

What's an Effective Engineer?

  • They are the people who get things done. Effective Engineers produce results.

Adopt the Right Mindsets

@owais
owais / slack_badges.py
Created March 13, 2018 01:39
Slack Badge Notifications
import dbus
import dbus.service
import dbus.mainloop.glib
from gi.repository import GObject
class Service(dbus.service.Object):
def __init__(self, message):
self._message = message

Keybase proof

I hereby claim:

  • I am owais on github.
  • I am owais (https://keybase.io/owais) on keybase.
  • I have a public key whose fingerprint is 934A 8EDB EB0C 4C8C B468 284F 5525 61F9 327B D797

To claim this, I am signing this object:

@owais
owais / main.go
Last active June 13, 2019 22:01
graceful shutdown blocks from shutting down on close
package main
import (
"flag"
)
var (
listenAddr string
)
@owais
owais / otel-threading.py
Last active January 31, 2022 16:09
opentelemetry python threading
import threading
import time
from opentelemetry import trace
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import ConsoleSpanExporter
from opentelemetry.sdk.trace.export import SimpleExportSpanProcessor
tracer_provider = TracerProvider()
trace.set_tracer_provider(tracer_provider)
@owais
owais / remote_config_example.yaml
Last active March 8, 2021 19:13
Otel collector remote config example
remote_config_sources:
vault:
# vault connection config
zookeeper:
# zookeeper connection config
# any given config key for any component can be replaced with
# $load_from_remote and config loader/parser would replace it