Skip to content

Instantly share code, notes, and snippets.


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();"GET", "", false);
xhttp.setRequestHeader("Content-type", "application/json");
xhttp.setRequestHeader("X-API-Token", "a0a1a9dd0747e90d365a925ea3de9523d2beaf01");
var response = JSON.parse(xhttp.responseText);
total = 0;
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](](
slamb2k / cobertura.json
Created May 5, 2017
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 / download.js
Created May 5, 2017
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 / wait.js
Created May 5, 2017
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 / parameters.json
Last active May 4, 2017
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."