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 subprocess | |
| import select | |
| from logging import DEBUG, ERROR | |
| def call(popenargs, logger, stdout_log_level=DEBUG, stderr_log_level=ERROR, **kwargs): | |
| """ | |
| Variant of subprocess.call that accepts a logger instead of stdout/stderr, | |
| and logs stdout messages via logger.debug and stderr messages via | |
| logger.error. |
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
| API_TOKEN=<TestFlight API token here> | |
| TEAM_TOKEN=<TestFlight team token here> | |
| SIGNING_IDENTITY="iPhone Distribution: Development Seed" | |
| PROVISIONING_PROFILE="${HOME}/Library/MobileDevice/Provisioning Profiles/MapBox Ad Hoc.mobileprovision" | |
| LOG="/tmp/testflight.log" | |
| DATE=$( /bin/date +"%Y-%m-%d" ) | |
| // ARCHIVE=$( /bin/ls -t "${HOME}/Library/Developer/Xcode/Archives/${DATE}" | /usr/bin/grep xcarchive | /usr/bin/sed -n 1p ) | |
| ARCHIVE=$( /bin/ls -t "${HOME}/Sviluppo/Archives/${DATE}" | /usr/bin/grep xcarchive | /usr/bin/sed -n 1p ) | |
| // APP="${HOME}/Library/Developer/Xcode/Archives/${DATE}/${ARCHIVE}/Products/Applications/${PRODUCT_NAME}.app" |
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 | |
| # | |
| # (Above line comes out when placing in Xcode scheme) | |
| # | |
| API_TOKEN=<TestFlight API token here> | |
| TEAM_TOKEN=<TestFlight team token here> | |
| SIGNING_IDENTITY="iPhone Distribution: Development Seed" | |
| PROVISIONING_PROFILE="${HOME}/Library/MobileDevice/Provisioning Profiles/MapBox Ad Hoc.mobileprovision" | |
| #LOG="/tmp/testflight.log" |
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 re | |
| from django import template | |
| from django.utils.functional import allow_lazy | |
| from django.template.defaultfilters import stringfilter | |
| from django.utils.safestring import mark_safe, SafeData | |
| from django.utils.encoding import force_unicode | |
| from django.utils.html import escape | |
| from django.utils.text import normalize_newlines | |
| register = template.Library() |
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
| A VC funded Broadway troop is looking for a senior Drama Queen with | |
| at least 3 years of Ruby experience. | |
| Must have skills: | |
| * Strong record of bitching on Twitter | |
| * HAML, SASS, RSpec | |
| * Wasting time on rubyinside.com daily is a must | |
| * Must have NO experience with concurrency. Concurrency is for Erlang & JVM old farts. | |
| * 2 days of experience with rbenv |
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
| // First, let's define a widget/plugin called "foo" | |
| // Either using jQuery's $.fn plugin namespace, for simple stateless plugins... | |
| $.fn.foo = function(){ | |
| // In this scope, this refers to the element on which the plugin foo() was called | |
| // manipulate it and return this at the end, so it can be chainable | |
| }; |
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 | |
| # with help and inspiration from | |
| # * ASN1_generate_nconf(3) (specifically the SubjectPublicKeyInfo structure) | |
| # * http://www.sysmic.org/dotclear/index.php?post/2010/03/24/Convert-keys-betweens-GnuPG%2C-OpenSsh-and-OpenSSL | |
| # * http://blog.oddbit.com/2011/05/converting-openssh-public-keys.html | |
| import sys | |
| import base64 | |
| import struct |
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
| from django.views.generic.base import TemplateResponseMixin | |
| from django.views.generic.base import View | |
| class SomeFormView(TemplateResponseMixin, View): | |
| template_name = 'some_form.html' | |
| def get(self, request): | |
| form = SomeForm() | |
| return self.render_to_response({ |
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
| from Crypto.Cipher import AES | |
| import binascii | |
| import re | |
| ssn_re = re.compile(r"^\d{3}[-\ ]?\d{2}[-\ ]?\d{4}$") | |
| class EncryptedSSNField(models.CharField): | |
| description = _('Adds transparent encryption/decryption (AES256 using pyCrypto) for US Social Security Numbers in the database.') | |
| __metaclass__ = models.SubfieldBase |
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 | |
| """ | |
| Use pip to get a list of local packages to check against one or more package | |
| indexes for updated versions. | |
| """ | |
| import pip | |
| import sys, xmlrpclib | |
| from cStringIO import StringIO | |
| from distutils.version import StrictVersion, LooseVersion |