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
Index: Lib/distutils/msvc9compiler.py | |
=================================================================== | |
--- Lib/distutils/msvc9compiler.py (revision 82816) | |
+++ Lib/distutils/msvc9compiler.py (working copy) | |
@@ -216,7 +216,7 @@ | |
newVariable = os.pathsep.join(newList) | |
return newVariable | |
-def find_vcvarsall(version): | |
+def find_vcvarsall(version, arch="x86"): |
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
git archive HEAD | aws s3 cp - s3://mybucket/$(git describe HEAD).zip |
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 python:2.7 | |
RUN apt-get update && \ | |
apt-get install -y groff && \ | |
pip install awscli==1.7.3 && \ | |
apt-get -y autoremove && \ | |
apt-get -y autoclean |
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
@app.route('/clients/login/<string:backend>/', methods=('GET', 'POST',)) | |
@psa('social.complete') | |
def complete(backend): | |
g.backend.STATE_PARAMETER = g.backend.REDIRECT_STATE = False | |
g.backend.redirect_uri = request.args['redirect_uri'] | |
user = g.backend.auth_complete() | |
return jsonify(**{ | |
'username': user.email, | |
'email': user.email, |
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 twisted.web.server import Site | |
from twisted.web.resource import Resource | |
from twisted.internet import reactor | |
from largerequest import LargeRequest | |
import hashlib, os, time, json, shutil, socket, boto | |
# Override tempdir to place temp files in same FS as destination | |
# this allows for better performance using mv rather than copying | |
# or re-writing the file. | |
import tempfile |
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
# -*- coding: utf-8 -*- | |
from __future__ import absolute_import, division, unicode_literals, print_function | |
import base64 | |
import json | |
# pip install cryptography | |
import cryptography | |
import cryptography.hazmat.primitives.hashes | |
import cryptography.hazmat.primitives.asymmetric.padding |
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
import shlex | |
# ffmpeg -f v4l2 -video_size 640x480 -i /dev/video0 -c:v libx264 -map 0:v:0 -s 640x480 -dn -sn -hls_list_size 0 -hls_time 10 webcam/prog_index.m3u8 | |
# ffmpeg -i input.flv -f image2 -vf fps=fps=1 out%d.png | |
# pixel_format, pixel_depth ='rgb24', 3 | |
# ffmpeg('-i "{input}" -s {size} -r:v {fps} -pix_fmt {pixel_format} -c:v rawvideo -an -f image2pipe {output}'.format( | |
# input=src, output='pipe:1', | |
# fps=fps, pixel_format=pixel_format, size='{w}x{h}'.format(w=width, h=height), |
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
$ aws iam upload-server-certificate \ | |
--server-certificate-name bryce_fisher-fleig_org \ | |
--certificate-body file://bryce_fisher-fleig_org.crt \ | |
--private-key file://bryce_fisher-fleig_org.key \ | |
--certificate-chain file://PostivieSSLCA2.crt \ | |
--path /cloudfront/ |
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
# Copyright (c) Twisted Matrix Laboratories. | |
# See LICENSE for details. | |
""" | |
An example demonstrating how to create a custom DNS server. | |
The server will calculate the responses to A queries where the name begins with | |
the word "workstation". | |
Other queries will be handled by a fallback resolver. |
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
(function($){ | |
$.getDjangoJSON = function(url, data, success){ | |
return $.ajax({ | |
url: url, | |
dataType: "django-json", | |
data: data, | |
success: success | |
}); | |
}; |