Please see dotfiles/s3up.py
This file contains 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
# My excessive ffmpeg conversion preset for high quality H264 files. | |
# | |
# Generally follows the "max" preset, with some values completely cracked | |
# out (me_range=32 *is* excessive). Leaves refs at 4 (since iPhone/iPad | |
# does not support higher values) and 8x8 DCT is disabled so that we | |
# end up with a file that is in the H264 Main profile. | |
# | |
# Save this as ~/.ffmpeg/libx264-max2.ffpreset | |
# | |
# Example use. (CRF determines filesize: lower CRF->higher quality and larger file. 22-24 results in ~1.5 to 2.0 Mbps.) |
This file contains 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
# regex for matching timestamp out of skype log | |
\[\d{2}/\d{2}/\d{2} \d{1,2}\:\d{2}\:\d{2} [AP]M\] |
This file contains 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 | |
# Using `ffmpeg` to convert an arbitrary video file to an ipad-compatible M4V (h264+AAC) | |
# file. Mac-specific since libfaac has occasional audio glitches and the `afconvert` command | |
# is of a much higher quality (since it uses the system's Quicktime libs). | |
# Assumes ffmpeg and x264 (and other libs ffmpeg uses to decode various video formats | |
# you want) are installed. | |
# | |
# Easy mode: | |
# * Install homebrew: http://github.com/mxcl/homebrew |
This file contains 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
from reviewgallery.settings.development.defaults import * | |
LOGGING = { | |
'version': 1, | |
'disable_existing_loggers': True, | |
'formatters': { | |
'default': { | |
'format': '%(name)s-%(levelname)s -- %(message)s' | |
} | |
}, |
This file contains 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/python | |
# | |
# Copyright 2009 Google Inc. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.0 | |
# |
This file contains 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
""" | |
Adds key strengthening (via sha384 + large number of hash iterations) to the | |
default Django password implementation. | |
The number of iterations is stored along with the hash so that in the future, | |
the number of rounds can be increased for new passwords in the same system. | |
Standard Django hashes look like: | |
algo$salt$hash |
This file contains 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 | |
# Wraps the standard tar command with the xz (LZMA2) | |
# compression program since Mac OS X's old version of `tar` | |
# doesn't have the -I shortcut flag. | |
# | |
# Requires XZ Utils. | |
# | |
# On Mac OS X with homebrew, you can get XZ Utils via: | |
# brew install xz |
This file contains 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 | |
# I take absolutely no responsibility for anything that happens when you run this. | |
while true; do | |
curl -s "http://www.google.com/?q=hardcore+porn" > /dev/null &\ | |
curl -s "http://www.google.com/?q=kiddie+porn" > /dev/null &\ | |
echo -n "." | |
sleep 5 | |
This file contains 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
# Example of making sure that multibyte characters are counted | |
# properly with regard to APIs such as Twitter. | |
# | |
# See http://dev.twitter.com/pages/counting_characters | |
# | |
# Uses example from above link: | |
# cafe (with diacritical): | |
# 0x63 0x61 0x66 0xC3 0xA9 (composed character) | |
# 0x63 0x61 0x66 0x65 0xCC 0x81 (e + combining diacritical) |