Skip to content

Instantly share code, notes, and snippets.

@sgr-ksmt
sgr-ksmt / acknowledgement_generator.swift
Created November 16, 2016 10:30
licenses plist generator: support CocoaPods/Carthage
#!/usr/bin/env xcrun --sdk macosx swift
import Foundation
let version = "1.1"
var debug = false
// MARK: Exit status code
enum ExitCode: Int32 {
case success = 0
import UIKit
extension UIImage {
// colorize image with given tint color
// this is similar to Photoshop's "Color" layer blend mode
// this is perfect for non-greyscale source images, and images that have both highlights and shadows that should be preserved
// white will stay white and black will stay black as the lightness of the image is preserved
func tint(tintColor: UIColor) -> UIImage {
@19h
19h / TiYoutube.js
Last active November 11, 2015 16:24
Titanium Mobile SDK iPhone / Android: Extract Youtube Video URL / URI from video-id / identification / name and play mp4 file. (Workaround for the recent change of security in Youtube)
Titanium.App.addEventListener("playvideo", function (e) {
var win11 = Titanium.UI.createWindow({
orientationModes: [Ti.UI.LANDSCAPE_LEFT, Ti.UI.LANDSCAPE_RIGHT],
title: "Video",
zIndex: 222222
});
var activeMovie = Titanium.Media.createVideoPlayer({
fullscreen: !0,
autoplay: !0,
@dawsontoth
dawsontoth / RecordingVideo.js
Created February 17, 2011 19:43
How to record video, then share or save it. Using Appcelerator Titanium!
/**
* This sample lets you record and share video with Appcelerator Titanium on Android.
* REQUIRES THE 1.6.0 RC OF TITANIUM MOBILE SDK
* http://developer.appcelerator.com/blog/2011/02/release-candidate-for-titanium-mobile-1-6-0.html
*/
/**
* First, create our UI. We'll have two buttons: record, and share.
*/
var win = Titanium.UI.createWindow({