Skip to content

Instantly share code, notes, and snippets.

View valvoline's full-sized avatar

Costantino Pistagna valvoline

View GitHub Profile
@valvoline
valvoline / Springboard.h
Created January 17, 2015 17:58
Sticky Headers for UICollectionView using UICollectionViewFlowLayout that acts like Photo.app collection, taking care of edgeInsets
//
// SpringboardLayout.h
//
// Created by valv0 on 11/10/14.
// Copyright (c) 2014 sofapps. All rights reserved.
//
#import <UIKit/UIKit.h>
@valvoline
valvoline / UIAlertController+Utilities.h
Created January 20, 2015 08:52
Simple category that wraps around the UIAlertController annoying stuff
//
// UIAlertController+Utilities.h
//
// Created by valvoline on 18/12/14.
// Copyright (c) 2014 sofapps. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIAlertController (Utilities)
@valvoline
valvoline / gist:88d4b1b2489854856ba9
Created October 9, 2015 08:57
Simple UIApplication Debugger for handleNonLaunchSpecificActions related bug
//
// UIApplication+Debug.m
//
// Created by valvoline on 09/10/15.
// Copyright © 2015 ISALabs. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIApplication (Debug)
//
// UIButtonClosureAdditions.swift
// pickerTest
//
// Created by valvoline on 27/10/15.
// Copyright © 2015 ISALabs. All rights reserved.
//
import UIKit
import ObjectiveC
//
// CIRotateFilter.h
// Touches
//
// Created by valvoline on 05/01/16.
// Copyright © 2016 valvoline. All rights reserved.
//
#import <CoreImage/CoreImage.h>
//
// Created by Costantino Pistagna on 08/02/2017.
// Copyright © 2017 sofapps. All rights reserved.
//
func integerWithBytes<T: IntegerType where T: ByteConvertible, T: BitshiftOperationsType>
(bytes: [UInt8]) -> T?
{
if bytes.count != sizeof(T) {
return nil
//
// Array+Utilities.swift
//
// Created by Costantino Pistagna on 26/07/16.
//
import Foundation
extension Array {
mutating func removeObject<T where T : Equatable>(obj: T) {
self = self.filter({$0 as? T != obj})
@valvoline
valvoline / String+HTML.swift
Created November 8, 2017 18:31
A swift string extension to deal with HTML
//
// String+HTML.swift
// AttributedString
//
// Created by Costantino Pistagna on 08/11/2017.
// Copyright © 2017 sofapps.it All rights reserved.
//
import UIKit
import Foundation
@valvoline
valvoline / UIImageView+URLRequest.swift
Created November 9, 2017 10:15
UIImageView extension specifically designed for UITableViewCell integration, setting also the highlighted corresponding image for seamlessly integration.
//
// UIImageView+URLRequest.swift
//
// Created by Costantino Pistagna on 06/11/2017.
// Copyright © 2017 Sofapps. All rights reserved.
//
import UIKit
import Foundation
{
"bridge": {
"name": "Home1bridge",
"username": "CD:32:D2:E1:CC:33",
"port": 50800,
"pin": "031-43-153"
},
"description": "This is an example configuration file.",