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 python3 | |
# | |
# This example adds testtools Details from a testtools TestCase. | |
# | |
# For more information about: testtools, Details, and Content Objects, visit: | |
# * https://testtools.readthedocs.org/en/latest/for-test-authors.html#details | |
from testtools import TestCase | |
from testtools.content import ( | |
ContentType, |
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 python3 | |
import logging | |
import re | |
from subunit import ByteStreamToStreamResult | |
from testtools import StreamToExtendedDecorator, TestResult | |
logging.basicConfig(level='INFO') |
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 python3 | |
""" | |
helloworld.py | |
Python3 and Qt5 | |
""" | |
from PyQt5 import QtWidgets | |
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 | |
# | |
# image metadata remover and date fixer. | |
# Corey Goldberg, 2014 | |
"""Recursively scan a directory tree for image files, and fix metadata. | |
* removes all metadata (Exif, IPTC, XMP, GPS Info, comment, thumbnail) | |
* sets metadata and file timestamps to oldest datetime found. |
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 | |
# | |
# gexiv2 image Exif date fixer. | |
# Corey Goldberg, 2014 | |
"""Recursively scan a directory tree, fixing dates | |
on all jpg/png image files. | |
Each file's Exif metadata and atime/mtime are 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
#!/usr/bin/env bash | |
# Generate gource video out of bzr repositories for Ubuntu Touch Core Apps. | |
# | |
# Corey Goldberg 2013 | |
# | |
# Usage: | |
# gource-ubuntu-core-apps.sh /path/to/repo1 /path/to/repo2 | |
# | |
# Example - generate video for all Ubuntu Touch Core Apps: |
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 bash | |
# Generates gource video out of multiple repositories. | |
# First, get a local branch/clone of each repository. | |
# Then, pass the repositories as command line arguments. | |
# | |
# Example: | |
# $ gource-multiple-repositories.sh /path/to/repo1 /path/to/repo2 | |
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
hamburger bash shell-prompt! | |
http://boingboing.net/2013/04/03/howto-turn-your-shell-prompt-i.html | |
to do this on Ubuntu: | |
- open terminal: | |
- $ sudo apt-get install ttf-ancient-fonts | |
- $ export PS1="\\u@\h \\w 🍔 " |
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 | |
# Launch XBMC in windowed mode, then use wmctrl to remove the titlebar | |
# Select display 1 | |
DISPLAY=:0.0 | |
# Start XBMC without blocking this script | |
xbmc & | |
# Wait for the XBMC window to appear |
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 | |
# Corey Goldberg, 2013 | |
import argparse | |
import pkgtools.pypi | |
""" | |
Command line script to lookup packages on Python Package Index (PyPI). |