Skip to content

Instantly share code, notes, and snippets.

View designatednerd's full-sized avatar

Ellen Shapiro designatednerd

View GitHub Profile
@steipete
steipete / DevelopmentEnviromentDetector.m
Last active February 7, 2025 15:27
Detect if you're currently running a development version or an App Store/Ad Hoc version.
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) {
@rafali
rafali / ResizeAnimation.java
Last active February 26, 2021 13:05
Resize animation on Android
public class ResizeAnimation extends Animation {
final int startWidth;
final int targetWidth;
View view;
public ResizeAnimation(View view, int targetWidth) {
this.view = view;
this.targetWidth = targetWidth;
startWidth = view.getWidth();
}
@karbassi
karbassi / Instructions.md
Created June 25, 2012 16:57
Create a ZIP file from an SVN url

Installing

  • Download svn-zip into /usr/local/bin/. For example: curl https://raw.github.com/gist/2989864/svn-zip > /usr/local/bin/svn-zip
  • Make sure that /usr/local/bin/ is in your PATH.

Usage

In your terminal, use:

svn-zip SVN_URL ZIP_FILE_NAME

@Jaybles
Jaybles / UIDeviceHardware.h
Created October 28, 2011 19:33
UIDeviceHardware - Determine iOS device being used
//
// UIDeviceHardware.h
//
// Used to determine EXACT version of device software is running on.
#import <Foundation/Foundation.h>
@interface UIDeviceHardware : NSObject
- (NSString *) platform;