Skip to content

Instantly share code, notes, and snippets.

Avatar

Alejandro Ramirez janodev

View GitHub Profile
View ioslocaleidentifiers.csv
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
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)
@janodev
janodev / PackageApplication
Created May 31, 2017
PackageApplication script from Xcode 8.2.1
View PackageApplication
#!/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 / resign.sh
Created Mar 28, 2017 — forked from mcxiaoke/resign.sh
A simple tool for resigning an iOS app ipa with a new certificate/mobileprovision
View resign.sh
#!/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 / diff.mdown
Created Jan 13, 2017 — forked from ndarville/diff.mdown
Paul Heckel's Diff Algorithm
View diff.mdown

[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 / gist:62849315b65590916f7d5d30cb31b9a6
Created Jul 29, 2016 — forked from reiz/gist:d67512deee814705134e
Vagrantfile for a Java dev. environment with Oracle Java 8 and Eclipse.
View gist:62849315b65590916f7d5d30cb31b9a6
# -*- 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
View GIFDownloader.h
//
// GIFDownloader.h
// TheJoysOfCode
//
// Created by Bob on 29/10/12.
// Copyright (c) 2012 Tall Developments. All rights reserved.
//
#import <Foundation/Foundation.h>
View uiappearance-selector.md

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

View openssl-build.sh
#!/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"
@janodev
janodev / gist:5292003
Last active Dec 15, 2015 — forked from iamleeg/gist:5290797
This creates an Objective-C object in the stack. ARC code.
View gist:5292003
#import <Foundation/Foundation.h>
#include <stdlib.h>
#include <objc/runtime.h>
@interface A : NSObject
@property (assign) int meaning;
@end
@implementation A
@janodev
janodev / Makefile
Last active Sep 23, 2016 — forked from boredzo/Makefile
dispatch_once is not reentrant. Use a NSReentrantLock if you want reentrancy.
View Makefile
CC=clang
CFLAGS+=-std=c99 -g
LDFLAGS+=-framework Foundation
dispatch_once_reentrancy_test: dispatch_once_reentrancy_test.o