Skip to content

Instantly share code, notes, and snippets.

//
// GIFDownloader.h
// TheJoysOfCode
//
// Created by Bob on 29/10/12.
// Copyright (c) 2012 Tall Developments. All rights reserved.
//
#import <Foundation/Foundation.h>
@janodev
janodev / gist:5292003
Last active December 15, 2015 16:49 — forked from iamleeg/gist:5290797
This creates an Objective-C object in the stack. ARC code.
#import <Foundation/Foundation.h>
#include <stdlib.h>
#include <objc/runtime.h>
@interface A : NSObject
@property (assign) int meaning;
@end
@implementation A
#!/bin/bash
# This script builds the iOS and Mac openSSL libraries
# It's expanded from https://github.com/st3fan/ios-openssl
set -xe
# Setup paths to stuff we need
OPENSSL_VERSION="1.0.1e"

Generate the list yourself:

$ cd /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS*.sdk/System/Library/Frameworks/UIKit.framework/Headers
$ grep -H UI_APPEARANCE_SELECTOR ./* | sed 's/ __OSX_AVAILABLE_STARTING(__MAC_NA,__IPHONE_5_0) UI_APPEARANCE_SELECTOR;//'

UIActivityIndicatorView

@janodev
janodev / gist:62849315b65590916f7d5d30cb31b9a6
Created July 29, 2016 10:18 — forked from reiz/gist:d67512deee814705134e
Vagrantfile for a Java dev. environment with Oracle Java 8 and Eclipse.
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"
config.vm.provider "virtualbox" do |vb|
vb.gui = true
@janodev
janodev / Makefile
Last active September 23, 2016 19:47 — forked from boredzo/Makefile
dispatch_once is not reentrant. Use a NSReentrantLock if you want reentrancy.
CC=clang
CFLAGS+=-std=c99 -g
LDFLAGS+=-framework Foundation
dispatch_once_reentrancy_test: dispatch_once_reentrancy_test.o
@janodev
janodev / diff.mdown
Created January 13, 2017 15:41 — forked from ndarville/diff.mdown
Paul Heckel's Diff Algorithm

[Isolating Differences Between Files][paper]

Advantage over Other Algorithms

The diff output is more specific:

[I]f a whole block of text is moved, then all of it, rather than just the beginning and end, is detected as changed.

>The algorithm described here avoids these difficulties. It detects differences that correspond very closely to our intuitive notion of difference.

@janodev
janodev / resign.sh
Created March 28, 2017 15:12 — forked from mcxiaoke/resign.sh
A simple tool for resigning an iOS app ipa with a new certificate/mobileprovision
#!/usr/bin/env bash
if [[ ! ( # any of the following are not true
# 1st arg is an existing regular file
-f "$1" &&
# ...and it has a .ipa extension
"${1##*.}" == "ipa" &&
# 2nd arg is an existing regular file
-f "$2" &&
# ...and it has an .mobileprovision extension
@janodev
janodev / PackageApplication
Created May 31, 2017 14:24
PackageApplication script from Xcode 8.2.1
#!/usr/bin/perl
#
# PackageApplication
#
# Copyright (c) 2009-2012 Apple Inc. All rights reserved.
#
# Package an iPhone Application into an .ipa wrapper
#
use Pod::Usage;
@janodev
janodev / ioslocaleidentifiers.csv
Created November 8, 2019 00:44 — forked from jacobbubu/ioslocaleidentifiers.csv
iOS Locale Identifiers
mr Marathi
bs Bosnian
ee_TG Ewe (Togo)
ms Malay
kam_KE Kamba (Kenya)
mt Maltese
ha Hausa
es_HN Spanish (Honduras)
ml_IN Malayalam (India)
ro_MD Romanian (Moldova)