Skip to content

Instantly share code, notes, and snippets.

View brenouchoa's full-sized avatar

Breno Rocha Uchôa brenouchoa

View GitHub Profile

Keybase proof

I hereby claim:

  • I am brenouchoa on github.
  • I am brenouchoa (https://keybase.io/brenouchoa) on keybase.
  • I have a public key ASBDDZqcwb53BP2ET3dF4fTlMmh3Fz1WW8-sLI_D5I3itwo

To claim this, I am signing this object:

@brenouchoa
brenouchoa / method_missing.py
Created August 7, 2017 17:47 — forked from karanlyons/method_missing.py
method_missing for Python: All the headaches of Ruby, now with added whitespace!
import dis
import inspect
class MethodMissingMixin:
def __getattr__(self, attr):
if hasattr(getattr(self, '__methodmissing__', None), '__call__'):
parent_frame = inspect.currentframe().f_back
instructions = dis.get_instructions(parent_frame.f_code)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Single-Column Responsive Email Template</title>
<style>
@media only screen and (min-device-width: 541px) {
.content {