Skip to content

Instantly share code, notes, and snippets.

View flexaddicted's full-sized avatar

Lorenzo B. flexaddicted

View GitHub Profile
@orta
orta / gist:6173320
Created August 7, 2013 11:38
iOS7 APIs for creating attributed strings from HTML
//
// NSAttributedString+StringFromHTML.m
// Artsy
//
// Created by Orta on 06/08/2013.
// Copyright (c) 2013 Art.sy. All rights reserved.
//
// This doesn't produce acceptable enough results, and thus is relagated here for another day sometime
@0xced
0xced / copy-reveal-dylib.sh
Last active March 15, 2016 15:11
Copy and codesign libReveal.dylib in Debug configuration (for use in a run script build phase)
#!/bin/bash -e
if [ "${CONFIGURATION}" != "Debug" ]; then
exit 0
fi
REVEAL_APP_PATH=$(mdfind -onlyin / "kMDItemCFBundleIdentifier == com.ittybittyapps.Reveal" | head -n 1)
if [ ! -d "${REVEAL_APP_PATH}" ]; then
echo "warning: Reveal.app not found."
exit 0
@ColinEberhardt
ColinEberhardt / gist:984907adbf8236077c1f
Last active June 15, 2016 23:22
Links from my talk at SwiftSummit
Silverlight and ReactiveExtensions article:
http://blog.scottlogic.com/2010/12/02/exploring-reactive-extensions-rx-through-twitter-and-bing-maps-mashups.html
My Ray Wenderlich author page, contains quite a few ReactiveCocoa and MVVM articles:
http://www.raywenderlich.com/u/ColinEberhardt
ObjC block syntax - say no more!
http://fuckingblocksyntax.com
Twitter app with sentiment analysis
@zhigang1992
zhigang1992 / argo.swift
Last active September 6, 2016 02:12
Argo Talk
// if you coming from the Argo Talk from WTB Swift
// here is the actual playground code: https://github.com/zhigang1992/ArgoTalk
import Foundation
struct Parser<T> {
let parse: (AnyObject) -> T?
}
@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
@brentsimmons
brentsimmons / headerview.m
Created April 26, 2014 22:09
UITableView header issues
#pragma mark - Class Methods
+ (BOOL)requiresConstraintBasedLayout {
return YES;
}
#pragma mark - Init
- (id)initWithFrame:(CGRect)frame {
@ryuichis
ryuichis / Event.swift
Created October 15, 2016 13:40
Swift 3 Struct & NSCoding
public struct Event {
public internal(set) var timeStamp: Date
public internal(set) var eventTag: String
public init(timeStamp: Date, tag: String) {
self.timeStamp = timeStamp
self.eventTag = tag
}
}
/*
erica sadun ericasadun.com
Math Types
Swift2
*/
import Foundation
import QuartzCore
@ArtFeel
ArtFeel / MGNavigationTransitioningDelegate.h
Last active August 1, 2019 21:23
Simple sliding transitioning for navigation controller mimics pre iOS7 push/pop animations.All you need, is simply set delegate for you navigation controller: self.navigationController.delegate = self.navigationTransitioningDelegate;NavigationController does not retain delegate, so you should hold it. Note: this code is free (http://unlicense.org)
//
// MGNavigationTransitioningDelegate
//
// Created by Philip Vasilchenko on 27.11.13.
//
#import <UIKit/UIKit.h>
@interface MGNavigationTransitioningDelegate : NSObject <UINavigationControllerDelegate>
@AlamofireSoftwareFoundation
AlamofireSoftwareFoundation / alamofire-04-27-2015-statement.md
Last active January 10, 2020 06:25
A response to recent concerns about security vulnerabilities in AFNetworking

Last week, a number of publications ran a story about 1,000's of apps allegedly being vulnerable due to an SSL bug in AFNetworking. These articles contain a number of inaccurate and misleading statements on this matter.

We are publishing this response to clarify and correct these statements.

Background Information

For those not familiar with AFNetworking, here are some relevant details about the library for this story:

  • AFNetworking is an open source, third-party library that provides convenience functionality on top of Apple's built-in frameworks.
  • One component of AFNetworking is AFSecurityPolicy, which handles authentication challenges according to a policy configured by the application. This includes the evaluation of X.509 certificates which servers send back when connecting over HTTPS.