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
| // 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
| #!/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
| 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
| set -o nounset | |
| SetupIntelTBB() | |
| { | |
| printf "*********************************\n${FUNCNAME[0]}\n" | |
| if [[ ! -d $CURRENT_PATH/components/intel/tbb ]]; then | |
| mkdir -p $CURRENT_PATH/components/intel/tbb | |
| fi |
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 | |
| SetupCatch() | |
| { | |
| printf "*********************************\n${FUNCNAME[0]}\n" | |
| if [[ ! -d components/catch/ ]]; then | |
| mkdir -p components/catch/include/ | |
| cd components/catch/include/ |
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 | |
| # Inspired by | |
| # https://github.com/mgrebenets/boost-xcode5-iosx/blob/master/boost.sh | |
| download_boost() { | |
| printf "*********************************\\n%s\\n" "${FUNCNAME[0]}" |
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
| # script expects to be at the root folder where ROSE was already downloaded | |
| # so if you: | |
| # mkdir ROSE | |
| # cd ROSE | |
| # git clone https://github.com/rose-compiler/rose . | |
| # This script should be in the ROSE folder | |
| set -o errexit | |
| set -o pipefail | |
| set -o nounset |
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
| /* | |
| Losely based on http://stackoverflow.com/questions/18154630/c-see-if-argument-is-numeric | |
| and other related answers on stackoverflow.com | |
| */ | |
| auto IsNumber(const std::string& maybeNumber) -> bool | |
| { | |
| auto decimal = false; | |
| for (char c : maybeNumber) | |
| { | |
| if (c == '.' && !decimal) |