Skip to content

Instantly share code, notes, and snippets.

View vcalfa's full-sized avatar

Vladimir Calfa vcalfa

  • Ringier Axel Springer Comunities s.r.o.
  • Zilina
View GitHub Profile
// Apple WWDC videos macOS App
// https://github.com/insidegui/WWDC
// Keď SWIFT, tak potom ...
// #1 https://talk.objc.io/
// #2 https://medium.com/
// #3 https://www.raywenderlich.com/
// #4 http://nsscreencast.com/
// #5 https://github.com/jakarmy/swift-summary
extension UIImageView {
func downloadedFrom(url: URL, contentMode mode: UIViewContentMode = .scaleAspectFit) {
contentMode = mode
URLSession.shared.dataTask(with: url) { (data, response, error) in
guard
let httpURLResponse = response as? HTTPURLResponse, httpURLResponse.statusCode == 200,
let mimeType = response?.mimeType, mimeType.hasPrefix("image"),
let data = data, error == nil,
let image = UIImage(data: data)
else { return }
//
// UIViewControllerExtension.swift
// Segue
//
// Created by Vladimir Calfa on 04/06/16.
// Copyright © 2016 Vladimir Calfa. All rights reserved.
//
import UIKit
import Foundation
//
// TransitionController.h
//
// Created by XJones on 11/25/11.
//
#import <UIKit/UIKit.h>
@interface TransitionController : UIViewController
@vcalfa
vcalfa / wkhtmltopdf.tablesplit.js
Created September 20, 2012 11:30 — forked from niflostancu/wkhtmltopdf.tablesplit.js
WkHtmlToPdf Table Splitting Hack
/**
* WkHtmlToPdf table splitting hack.
*
* Script to automatically split multiple-pages-spanning HTML tables for PDF
* generation using webkit.
*
* To use, you must adjust pdfPage object's contents to reflect your PDF's
* page format.
* The tables you want to be automatically splitted when the page ends must
* have a class name of "splitForPrint" (can be changed).