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
if [ $CONFIGURATION == Release ]; then | |
buildNumber=$(/usr/libexec/PlistBuddy -c "Print CFBundleVersion" "${PROJECT_DIR}/${INFOPLIST_FILE}") | |
buildNumber=$(($buildNumber + 1)) | |
/usr/libexec/PlistBuddy -c "Set :CFBundleVersion $buildNumber" "${PROJECT_DIR}/${INFOPLIST_FILE}" | |
fi |
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
// | |
// URLBuilder.h | |
// lyrical | |
// | |
// Created by Alex Chesters on 13/11/2015. | |
// Copyright © 2015 Alex Chesters. All rights reserved. | |
// | |
#import <Foundation/Foundation.h> |
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
node { | |
try { | |
def mvnHome | |
stage('Preparation') { | |
git 'https://github.com/jglick/simple-maven-project-with-tests.git' | |
mvnHome = tool 'M3' | |
} | |
stage('Build') { | |
sh "'${mvnHome}/bin/mvn' -Dmaven.test.failure.ignore clean package" | |
} |
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
pipeline { | |
stages { | |
stage('Preparation') { | |
env.mvnHome = tool 'M3' | |
} | |
stage('Build') { | |
sh "'${mvnHome}/bin/mvn' -Dmaven.test.failure.ignore clean package" | |
} | |
} | |
post { |
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
stage('Set the build display name') { | |
steps { | |
script { | |
CURRENT_BRANCH = sh(returnStdout: true, script: 'git rev-parse --abbrev-ref HEAD').trim() | |
CURRENT_HASH = sh(returnStdout: true, script: 'git rev-parse --short HEAD').trim() | |
currentBuild.displayName = "$CURRENT_BRANCH - $CURRENT_HASH" | |
} | |
} | |
} |
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
import boto3 | |
client = boto3.client(‘rekognition’, region_name=’eu-west-1') | |
def compare_faces(source_image_path, target_image_path): | |
source_image = open(source_image_path, ‘rb’) | |
target_image = open(target_image_path, ‘rb’) | |
response = client.compare_faces( | |
SourceImage={‘Bytes’: bytearray(source_image.read())}, | |
TargetImage={‘Bytes’: bytearray(target_image.read())} | |
) |
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
{ | |
"Description": "A Budget, with alarm, to monitor My Component", | |
"Resources": { | |
"EmailTopic": { | |
"Type": "AWS::SNS::Topic", | |
"Properties": { | |
"Subscription": [ | |
{ | |
"Endpoint": "[email protected]", | |
"Protocol": "email" |
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
const invertPromise = (promise) => new Promise( | |
(resolve, reject) => promise.then(reject, resolve) | |
) | |
const raceToSuccess = (promises) => invertPromise( | |
Promise.all(promises.map(invertPromise)) | |
) | |
const fast = () => { | |
return new Promise((resolve) => { |
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
const UKPD = require('ukpd') | |
try { | |
const data = await UKPD.streetLevel('52.629729', '-1.131592', '2016-07') | |
console.log(`there were ${data.length} crimes in the area during 2016-07`) | |
} catch (err) { | |
console.error('An error occurred', err) | |
} |
OlderNewer