This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# VERSION 1.0.4 | |
# Author: @madhavajay | |
# This currently works for iOS and watchOS in the Simulator and Devices | |
# Changes | |
# Using ${TOOLCHAIN} in two places now | |
# Added double quotes " around paths | |
# Fixed watchOS Issues | |
# Instructions iOS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
git clone git@github.com:opencv/opencv.git | |
cd opencv | |
git checkout 3.3.0 | |
python platforms/ios/build_framework.py ios \ | |
--dynamic \ | |
--without imgcodec --without videoio --without video --without calib3d --without features2d \ | |
--without objdetect --without dnn --without ml --without flann --without photo --without stitching \ | |
--without cudaarithm --without cudabgsegm --without cudacodec --without cudafeatures2d \ | |
--without cudafilters --without cudaimgproc --without cudalegacy --without cudaobjdetect \ |
Extension:
import Foundation
import UIKit
extension UIColor {
convenience init(hexString: String) {
let hex = hexString.trimmingCharacters(in: CharacterSet.alphanumerics.inverted)
var int = UInt32()
Scanner(string: hex).scanHexInt32(&int)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func generateRandomColor() -> UIColor { | |
let hue : CGFloat = CGFloat(arc4random() % 256) / 256 // use 256 to get full range from 0.0 to 1.0 | |
let saturation : CGFloat = CGFloat(arc4random() % 128) / 256 + 0.5 // from 0.5 to 1.0 to stay away from white | |
let brightness : CGFloat = CGFloat(arc4random() % 128) / 256 + 0.5 // from 0.5 to 1.0 to stay away from black | |
return UIColor(hue: hue, saturation: saturation, brightness: brightness, alpha: 1) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Copyright (c) 2011-present, NimbusKit. All rights reserved. | |
This source code is licensed under the BSD-style license found at http://nimbuskit.info/license | |
Extracted from NimbusKit: Swift Edition at https://github.com/nimbuskit/swift | |
*/ | |
extension NSNotificationCenter { | |
/** |
title | sidebar |
---|---|
Segment Event Tracking for Shopify |
Shopify |
Segment makes it simple for Shopify merchants to integrate analytics, email marketing, advertising and optimization tools. Rather than installing all your tools individually, you just install Segment once. We collect your data, translate it, and route it to any tool you want to use with the flick of a switch. Using Segment as the single platform to manage and install your third-party services will save you time and money.
The guide below explains how to install Segment in your Shopify store. All you need to get up and running is copy and paste a few snippets of code into your theme editor. (You don't have to edit the code or be versed in JavaScript.) The following guide will show you how, step by step.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Pod::Spec.new do |s| | |
s.name = 'POD_NAME' | |
s.version = '1.0.0' | |
s.license = { :type => 'MIT', :file => 'LICENSE' } | |
s.summary = 'Example of pod which installs a run script into the Xcode project (first target)' | |
s.homepage = 'https://github.com/phatblat/POD_NAME' | |
s.authors = { 'Ben Chatelain' => 'benchatelain@gmail.com' } | |
s.source = { :git => 'https://github.com/phatblat/POD_NAME.git', :tag => s.version.to_s } | |
s.ios.deployment_target = '6.0' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
rem configurable parameters | |
set SCREENCAP_FILE_PREFIX=screenshot | |
rem the dir on the device where the screenshot will be stored temporarily | |
set SCREENCAP_WORKING_DIR=/sdcard/ | |
rem adb path, leave blank if adb is already on the user or system path | |
set SCREENCAP_ADB_PATH= |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#set these in your environment/profile (NOT HERE) | |
AWS_ACCESS_KEY="" | |
AWS_SECRET_KEY="" | |
function s3get { | |
#helper functions | |
function fail { echo "$1" > /dev/stderr; exit 1; } | |
#dependency check |