This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## 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="\"" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python2 | |
# Quick and dirty demonstration of CVE-2014-0160 by Jared Stafford ([email protected]) | |
# The author disclaims copyright to this source code. | |
import sys | |
import struct | |
import socket | |
import time | |
import select |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func BindHexEncodedField(field *[]byte) func(string, []string, binding.Errors) binding.Errors { | |
return func(fieldName string, formVals []string, errs binding.Errors) binding.Errors { | |
var err error | |
*field, err = hex.DecodeString(formVals[0]) | |
if err != nil { | |
errs.Add([]string{fieldName}, binding.DeserializationError, err.Error()) | |
} | |
return errs | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Copyright (c) 2015 W. Mark Kubacki <[email protected]> | |
# Licensed under the terms of the RPL 1.5 for all usages | |
# http://www.opensource.org/licenses/rpl1.5 | |
# | |
set -e -o pipefail | |
CAsubj="/C=DE/ST=Niedersachsen/L=Hannover/O=Dummy CA/CN=Sign-It-All" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Gets videos, for example from YouTube, as best-quality separate tracks | |
# and stitches them, video by video, into a MKV – avoiding excess clutter files. | |
# | |
# wrapper to: mkvtoolnix youtube-dl iconv jq file | |
# | |
# author: W-Mark Kubacki <[email protected]> | |
set -e -o pipefail |
OlderNewer