Skip to content

Instantly share code, notes, and snippets.

@MasterAM
MasterAM / _.md
Created April 20, 2014 19:32
Tributary inlet
@MasterAM
MasterAM / _.md
Created April 20, 2014 19:32
Tributary inlet
@MasterAM
MasterAM / _.md
Created April 22, 2014 03:06
so-test
@MasterAM
MasterAM / _.md
Created April 22, 2014 03:36
so-test
@MasterAM
MasterAM / designer.html
Last active August 29, 2015 14:12
designer
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-item/core-item.html">
<polymer-element name="my-element">
<template>
@MasterAM
MasterAM / designer.html
Last active August 29, 2015 14:13
designer
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-submenu.html">
<polymer-element name="tanku-dual-drawer-view">
<template>
@MasterAM
MasterAM / designer.html
Last active August 29, 2015 14:13
designer
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../paper-icon-button/paper-icon-button.html">
<polymer-element name="my-element">
<template>
@MasterAM
MasterAM / unpack.py
Created May 12, 2015 09:54
This file is meant to unpack Israeli court attachments embedded in signature files. I got one of those files without the original file as the only attachment, while the email message stated there were 2 attachments. I don't know the general structure of those files since I only had this instance to deal with, but I hope someone else finds it use…
import base64
import xml.etree.ElementTree as ET
import sys
def decode(infile, outfile):
tree = ET.parse(infile)
xmlns = '{http://www.w3.org/2000/09/xmldsig#}'
b64 = tree.find("./SignaturePackage/{0}Signature/{0}Object/DocumentContent".format(xmlns)).text
txt = base64.b64decode(b64)