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 | |
import string, time, calendar, hashlib, urllib2, smtplib | |
from email.mime.text import MIMEText | |
# Cydia globals | |
product_ids = ['org.thebigboss.somepackage', 'org.thebigboss.someotherpackage'] | |
splits = [ 0.70, 0.35 ] | |
vendor_id = "" | |
vendor_secret = "" |
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.words.protocols import irc | |
from twisted.internet import reactor, protocol | |
import sys, os, subprocess, tempfile | |
class CycriptBot(irc.IRCClient): | |
nickname = "cycriptbot" | |
def __init__(self): | |
self.process = "SpringBoard" |
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
// Use case being removing null values from the results of JSON encoding (thus only supports dictionaries and arrays) | |
__block id (^removeNull)(id) = ^(id rootObject) { | |
// Recurse through dictionaries | |
if ([rootObject isKindOfClass:[NSDictionary class]]) { | |
NSMutableDictionary *sanitizedDictionary = [NSMutableDictionary dictionaryWithDictionary:rootObject]; | |
[rootObject enumerateKeysAndObjectsUsingBlock:^(id key, id obj, BOOL *stop) { | |
id sanitized = removeNull(obj); | |
if (!sanitized) { | |
[sanitizedDictionary removeObjectForKey:key]; | |
} else { |
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 | |
# The only tool used here that is not included with OS X is `lzma`. | |
# It is only used when extracting packages with LZMA data compression. | |
echo "Downloading list of packages..." | |
REPOS=('http://apt.thebigboss.org/repofiles/cydia'); # Others, such as ModMyi can be added here | |
for i in "${!REPOS[@]}"; do | |
curl -s -L "${REPOS[i]}/dists/stable/main/binary-iphoneos-arm/Packages.bz2" | bzcat -- >> "Packages.${i}" | |
done |
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 UIKit; | |
@import AVFoundation; | |
@class _UISiriWaveyView; | |
@protocol _UISiriWaveyViewDelegate <NSObject> | |
- (CGFloat)audioLevelForWaveyView:(_UISiriWaveyView *)waveyView; | |
@end | |
typedef NS_ENUM(NSInteger, _UISiriWaveyViewMode) { |
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
// | |
// CKSpinnerView.h | |
// | |
// Created by Conrad Kramer on 9/19/13. | |
// Copyright (c) 2013 Conrad Kramer. All rights reserved. | |
// | |
#import <CKShapeView/CKShapeView.h> | |
@interface CKSpinnerView : CKShapeView |
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 | |
# coding: utf8 | |
import sys, urllib2, json | |
def width(): | |
def ioctl_GWINSZ(fd): | |
try: | |
import fcntl, termios, struct, os | |
cr = struct.unpack('hh', fcntl.ioctl(fd, termios.TIOCGWINSZ, '1234')) |
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
// | |
// CKBlurDetection.h | |
// | |
// Created by Conrad Kramer on 1/23/14. | |
// Copyright (c) 2014 Kramer Software Productions, LLC. All rights reserved. | |
// | |
extern BOOL CKBlurEnabled(); |
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 | |
tail -f $(ls -t "$HOME/Library/Logs/CoreSimulator/"*/system.log | head -1) |
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
@implementation UIImage (CGImagePropertyOrientation) | |
- (CGImagePropertyOrientation)cgImagePropertyOrientation { | |
switch (self.imageOrientation) { | |
case UIImageOrientationUp: | |
return kCGImagePropertyOrientationUp; | |
case UIImageOrientationDown: | |
return kCGImagePropertyOrientationDown; | |
case UIImageOrientationLeft: | |
return kCGImagePropertyOrientationLeft; |
OlderNewer