Skip to content

Instantly share code, notes, and snippets.

View odemolliens's full-sized avatar

@odemolliens odemolliens

View GitHub Profile
@odemolliens
odemolliens / compression.swift
Created February 8, 2018 13:24 — forked from jaumevn/compression.swift
Video Compression in Swift
func compress(videoPath : String, exportVideoPath : String, renderSize : CGSize, completion : (Bool) -> ()) {
let videoUrl = NSURL(fileURLWithPath: videoPath)
if (!existsFileAtUrl(videoUrl)) {
completion(false)
return
}
let videoAssetUrl = AVURLAsset(URL: videoUrl, options: nil)
@odemolliens
odemolliens / .swift
Created October 5, 2016 11:37
iOS Swift dashed lines extension
public let kShapeDashed : String = "kShapeDashed"
extension UIView {
func removeDashedBorder(_ view: UIView) {
view.layer.sublayers?.forEach {
if kShapeDashed == $0.name {
$0.removeFromSuperlayer()
}
}
@odemolliens
odemolliens / sim-run.sh
Created December 23, 2016 08:02 — forked from shazron/sim-run.sh
Run Xcode Simulator project from the command line XCode 8
#!/bin/bash
#
# Build and iPhone Simulator Helper Script
# Shazron Abdullah 2011
#
# WARN: - if your .xcodeproj name is not the same as your .app name,
# this won't work without modifications
# - you must run this script in where your .xcodeproj file is
PROJECTNAME=$1