Skip to content

Instantly share code, notes, and snippets.

Avatar

Simon Lamb slamb2k

View GitHub Profile
View 2nd.txt
docker run -d -e TZ=America/New_York -e MYSQL_USER=zmuser -e MYSQL_PASSWORD=zmpass -e MYSQL_DATABASE=zm -e MYSQL_ROOT_PASSWORD=mysqlpsswd -e MYSQL_ROOT_HOST=% --net net --name db mysql/mysql-server:5.7
View widget.html
function GetData() {
var xhttp = new XMLHttpRequest();
xhttp.open("GET", "https://api.mobile.azure.com/v0.1/apps/silamb/XamarinDevDays/analytics/events/NormalOrdering/properties/TimeTaken/counts?start=2017-07-24&count=10", false);
xhttp.setRequestHeader("Content-type", "application/json");
xhttp.setRequestHeader("X-API-Token", "a0a1a9dd0747e90d365a925ea3de9523d2beaf01");
xhttp.send();
var response = JSON.parse(xhttp.responseText);
total = 0;
@slamb2k
slamb2k / mobile-center_markdown.txt
Last active Jul 15, 2017
Mobile Center Markdown
View mobile-center_markdown.txt
## CodeChase-Companion-iOS
Mobile app powered by `Xamarin` and `iOS`
[![Build status](https://build.mobile.azure.com/v0.1/apps/a987dbd7-a072-40d2-a7b4-34ca18cb73b9/branches/master/badge)](https://mobile.azure.com/orgs/someorg/apps/someapp/build/branches/master)
@slamb2k
slamb2k / cobertura.json
Created May 5, 2017
VSMobileCenterBuildCobertura
View cobertura.json
"scripts": {
"test": "istanbul cover node_modules/mocha/bin/_mocha -- -R list",
"coverage": "istanbul cover --report cobertura node_modules/mocha/bin/_mocha -- -R list"
},
@slamb2k
slamb2k / download.js
Created May 5, 2017
MobileCenterBuildDownload
View download.js
function downloadOutput(buildId) {
util.debug("Getting build output for Build Id: {0}", buildId);
// Construct build output Url
var buildOutputUrl = `${mobileCenterBaseUrl}/builds/${buildId}/downloads/build`;
var options = {
url: buildOutputUrl,
headers: {
"X-API-Token": apiToken,
@slamb2k
slamb2k / wait.js
Created May 5, 2017
VSMobileCenterBuildWait
View wait.js
function waitForCompletion(buildId) {
return Q.delay(waitTime * 1000)
.then(function () {
return checkForCompletion(buildId)
})
.then(function (finished) {
return finished === true ? buildId : waitForCompletion(buildId);
});
}
View gist:3f0c84a2d9461759f010398effeade46
// Construct build definition Url
var buildDefinitionUrl = `${mobileCenterBaseUrl}/branches/master/builds`;
var options = {
url: buildDefinitionUrl,
method: 'POST',
headers: {
"X-API-Token": apiToken,
"Accept": "application/json",
"Content-Type": "application/json"
View getMobileCenterEndpointDetails.js
/*
* Retrieves the details from the service endpoint defined for Mobile Center in VSTS
*/
function getMobileCenterEndpointDetails(endpointInputFieldName) {
'use strict';
var errorMessage = "Can't decode endpoint.";
var endpoint = tl.getInput(endpointInputFieldName, true);
console.log(`Endpoint: ${endpoint}`);
@slamb2k
slamb2k / parameters.json
Last active May 4, 2017
VSMobileCenterBuildParameters
View parameters.json
"inputs": [
{
"name": "serverEndpoint",
"type": "connectedService:vsmobilecenter",
"label": "Mobile Center Connection",
"defaultValue": "",
"required": true,
"helpMarkDown": "Select the service endpoint for your Visual Studio Mobile Center connection. To create one, click the Manage link and create a new service endpoint."
},
{
You can’t perform that action at this time.