- Install cmake
- Add to cmake to PATH
PATH=$PATH:/Applications/CMake.app/Contents/bin
- Clone OpenCV repository
cd ~/<my_working _directory>
git clone https://github.com/opencv/opencv.git
| import Foundation | |
| class MyService: NSObject, MyServiceProtocol { | |
| func upperCaseString(_ string: String, withReply reply: @escaping (String) -> Void) { | |
| let response = string.uppercased() | |
| reply(response) | |
| } | |
| } |
| # build the environment ... this will take awhile | |
| docker run -v $(pwd):/outputs -it amazonlinux:2016.09 /bin/bash /outputs/build.sh | |
| # should end with something like "venv compressed size 51M" | |
| # unpackage that environment | |
| unzip venv.zip -d ve_package/ |
| #!/usr/bin/env bash | |
| #################################################################################### | |
| # Slack Bash console script for sending messages. | |
| #################################################################################### | |
| # Installation | |
| # $ curl -s https://gist.githubusercontent.com/andkirby/67a774513215d7ba06384186dd441d9e/raw --output /usr/bin/slack | |
| # $ chmod +x /usr/bin/slack | |
| #################################################################################### | |
| # USAGE | |
| # Send message to slack channel/user |
| watchman watch-del-all && rm -rf node_modules/ && yarn cache clean && yarn install && yarn start -- --reset-cache |
PATH=$PATH:/Applications/CMake.app/Contents/bin
cd ~/<my_working _directory>
git clone https://github.com/opencv/opencv.git
This bootstraps FaaS onto your Raspberry Pi or ARM board with Docker.
Any Linux/UNIX process can be made a serverless function. Communication with functions is via an API gateway with an easy to use UI portal.
https://github.com/alexellis/faas
Here's the one-shot equivalent from the TestDrive guide
| extension Data { | |
| /** | |
| Consumes the specified input stream, creating a new Data object | |
| with its content. | |
| - Parameter reading: The input stream to read data from. | |
| - Note: Closes the specified stream. | |
| */ | |
| init(reading input: InputStream) { | |
| self.init() | |
| input.open() |
| #!/usr/bin/env bash | |
| # | |
| # Author: Stefan Buck | |
| # License: MIT | |
| # https://gist.github.com/stefanbuck/ce788fee19ab6eb0b4447a85fc99f447 | |
| # | |
| # | |
| # This script accepts the following parameters: | |
| # | |
| # * owner |
| UIFont.familyNames.forEach({ familyName in | |
| let fontNames = UIFont.fontNames(forFamilyName: familyName) | |
| print(familyName, fontNames) | |
| }) |
| function findNb(m) { | |
| // create an endless loop that increments n, the cube number, starting with a value of 1 | |
| for ( var n = 0;;n++ ) { | |
| if ( m > 0 ) { | |
| // if m, the total volume, is not 0, we will subtract the volume of the current cube from it | |
| // first calculate the volume of the current cube | |
| var currCubeVol = Math.pow( n+1, 3); | |