Skip to content

Instantly share code, notes, and snippets.

View mark-kubacki's full-sized avatar
🎏

Mark Kubacki mark-kubacki

🎏
  • Germany, European Union
View GitHub Profile
<link rel="import" href="../core-drawer-panel/core-drawer-panel.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icons/iconsets/av-icons.html">
<link rel="import" href="../paper-fab/paper-fab.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<polymer-element name="my-element">
<template>
#!/usr/bin/env python2
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford (jspenguin@jspenguin.org)
# The author disclaims copyright to this source code.
import sys
import struct
import socket
import time
import select
## Syntax highlighting of HTML with mixed-ins, for the editor Nano.
##
syntax "html" "\.(html|mak)$"
magic "HTML document text"
color brightblue start="<" end=">"
color red "&[^;[[:space:]]]*;"
# AngularJS and similar
color brightwhite start="\{\{" end="\}\}"
color green "ng-[^>\"\ \=]*"
color green start="ng-[^>\"\ \=]*\=\"" end="\""
@mark-kubacki
mark-kubacki / gist:1379050
Created November 19, 2011 16:57 — forked from j2labs/gist:1042778
JSON speed test with many implementations
#!/usr/bin/env python
# The output geneally looks like this:
#
# $ ./serialization.py
# Dumping:
# json: 6.40960884094
# simplejson: 6.82945179939
# cjson: 2.23045802116
# ujson: 0.806604146957
@mark-kubacki
mark-kubacki / limited_csv_fun.py
Created September 20, 2011 16:05
Beispiel: CSV Dateien einlesen
import csv
__all__ = ['read_csv_file']
def unicode_csv_reader(utf8_data, dialect=csv.excel, **kwargs):
csv_reader = csv.reader(utf8_data, dialect=dialect, **kwargs)
for row in csv_reader:
yield [unicode(cell, 'utf-8', errors='ignore') for cell in row]
def read_csv_file(filename):
@mark-kubacki
mark-kubacki / fakemail.py
Created September 20, 2011 15:52
Dummy Email Server (genauer MTA)
#!/usr/bin/env python
#
# fakemail (Python version)
#
# $Id: fakemail.py,v 1.4 2011/06/09 16:57:10 ashtong Exp $
import asyncore
import getopt
import os
@mark-kubacki
mark-kubacki / mailing.py
Created September 20, 2011 15:47
Modul zum Versenden von Emails
import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.base import MIMEBase
from email.mime.text import MIMEText
from email.header import Header
from email.Utils import COMMASPACE, formatdate
from email import Encoders
try:
import turbomail