Watchers per repo, for each of my repos. Note: The GitHub API only lets me get the first few repos, so the list is incomplete.
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/env python | |
import xmlrpclib | |
import pip | |
import argparse | |
from pkg_resources import parse_version | |
def version_number_compare(version1, version2): | |
return cmp(parse_version(version1), parse_version(version2)) |
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 -*- | |
import datetime | |
from south.db import db | |
from south.v2 import DataMigration | |
from django.db import models | |
class Migration(DataMigration): | |
def forwards(self, orm): | |
db.execute('UPDATE auth_user SET password=CONCAT("bcrypt", SUBSTR(password, 3)) WHERE password LIKE "bc$%%"') |
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 threading import local | |
_blah = local() | |
class StopThatShit(Exception): | |
pass | |
def patch(): | |
from django.db.backends import util | |
from django import template |
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
// Bless a certain initializer at compile time | |
// | |
// Sample usage: | |
// - (instancetype)initWithObject:(id)object | |
// - (instancetype)init ECDesignatedInitializer(initWithObject:); | |
// | |
#define ECDesignatedInitializer(__SEL__) __attribute__((unavailable("Invoke the designated initializer `" # __SEL__ "` instead."))) |
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 <objc/runtime.h> | |
static void SwizzleClassMethod(Class klass, SEL original, SEL new) | |
{ | |
Method origMethod = class_getClassMethod(klass, original); | |
Method newMethod = class_getClassMethod(klass, new); | |
if (class_addMethod(klass, original, method_getImplementation(newMethod), method_getTypeEncoding(newMethod))) { | |
class_replaceMethod(klass, new, method_getImplementation(origMethod), method_getTypeEncoding(origMethod)); |
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 sys | |
import os | |
try: | |
from setuptools import setup, find_packages | |
except ImportError: | |
from distutils.core import setup | |
from distutils.util import convert_path | |
def _find_packages(where='.', exclude=()): |
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 | |
travis encrypt ${HIPCHAT_API_KEY}@${HIPCHAT_ROOM} --add notifications.hipchat.rooms |
@holman got a request about our deployment system, heaven
I know it's not a high priority, but has there been any activity on open-sourcing the core Heaven gem?
There is. I've been working on extracting the non-GitHub specific parts into two gems. This first is a CLI portion called hades. The second is an HTTP API portion called heaven.
When you open source something previously used as in internal tool like Heaven, Hubot, Boxen, etc., how do you manage and hook in the parts that need to stay internal?
Normally I focus around four questions:
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
static BOOL PSPDFIsDevelopmentBuild(void) { | |
#if TARGET_IPHONE_SIMULATOR | |
return YES; | |
#else | |
static BOOL isDevelopment = NO; | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ | |
// There is no provisioning profile in AppStore Apps. | |
NSData *data = [NSData dataWithContentsOfFile:[NSBundle.mainBundle pathForResource:@"embedded" ofType:@"mobileprovision"]]; | |
if (data) { |