This file contains hidden or 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
| set -o nounset | |
| SetupXcodeCoverage() | |
| { | |
| printf "*********************************\n${FUNCNAME[0]}\n" | |
| if [[ ! -d components/XcodeCoverage/ ]]; then | |
| cd components/ | |
| git clone https://github.com/jonreid/XcodeCoverage.git |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| # Jaime O. Rios | |
| # 2019-06-2 | |
| # Script will clone, config and build OpenSSL for macOS | |
| # Script expects to be invoked from the root project directory | |
| set -o errexit | |
| set -o nounset | |
| set -o pipefail |
This file contains hidden or 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
| // Jaime O. Rios | |
| #include <boost/algorithm/clamp.hpp> | |
| #include <boost/geometry.hpp> | |
| #include <boost/geometry/geometries/point_xy.hpp> | |
| #include <iostream> | |
| namespace bg = boost::geometry; | |
| using point_t = bg::model::point< int32_t, 2, bg::cs::cartesian >; |
This file contains hidden or 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
| tell application "Mail" | |
| set mySelection to selection | |
| set myMessage to item 1 of mySelection | |
| set theSender to sender of myMessage | |
| extract address from theSender | |
| -- https://stackoverflow.com/questions/15670363/applescript-to-find-domain-of-the-sender-of-mail-and-add-it-to-the-rules | |
| set theDomain to (do shell script "echo " & quoted form of rich text 1 through -2 of theSender & " | awk " & quoted form of "{split($0,a,\"@\"); print a[2]}") | |
| display dialog theDomain |
This file contains hidden or 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 -o errexit | |
| set -o pipefail | |
| set -o nounset | |
| setup_opencv() | |
| { | |
| printf "*********************************\n${FUNCNAME[0]}\n" | |
| local readonly PARENT_FOLDER=${1:-third_party} |
This file contains hidden or 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
| @implementation VersionStringDemo | |
| - (void)updateVersionLabel | |
| { | |
| NSString* version = | |
| [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleShortVersionString"]; | |
| NSString* build = | |
| [[[NSBundle mainBundle] infoDictionary] objectForKey:(NSString*)kCFBundleVersionKey]; | |
| NSString* versionString = [NSString stringWithFormat:@"Version: %@ Build: %@", version, build]; |
This file contains hidden or 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 | |
| # shell script to execute OpenCV tests prior to creating pull request | |
| set -o errexit | |
| set -o nounset | |
| main() | |
| { | |
| cd $CURRENT_PATH/build/bin/Debug | |
| ./opencv_annotation | |
| ./opencv_createsamples |
This file contains hidden or 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
| // https://stackoverflow.com/questions/3073520/animate-text-change-in-uilabel | |
| // | |
| - (void)animate:(UILabel*)label with:(NSString*)text | |
| { | |
| CATransition* animation = [CATransition animation]; | |
| animation.timingFunction = | |
| [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; | |
| animation.type = kCATransitionFade; | |
| animation.duration = 0.75; | |
| [label.layer addAnimation:animation forKey:@"kCATransitionFade"]; |
This file contains hidden or 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
| [ | |
| { "key": "alt+cmd+left", "command": "editor.fold", | |
| "when": "editorTextFocus" }, | |
| { "key": "alt+cmd+right", "command": "editor.unfold", | |
| "when": "editorTextFocus" }, | |
| { "key": "cmd+alt+[", "command": "editor.action.moveLinesUpAction", | |
| "when": "editorTextFocus" }, | |
| { "key": "cmd+alt+]", "command": "editor.action.moveLinesDownAction", | |
| "when": "editorTextFocus" }, |
This file contains hidden or 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 setVersionLabel() | |
| { | |
| let mainBundle = Bundle.main | |
| let version = mainBundle.infoDictionary!["CFBundleShortVersionString"] as! String | |
| let build = mainBundle.infoDictionary![kCFBundleVersionKey as String] as! String | |
| versionLabel.text = "Version \(version) Build: \(build)" | |
| } |