Skip to content

Instantly share code, notes, and snippets.

View atwayne's full-sized avatar

Wayne Wang atwayne

  • Shanghai
  • 08:58 (UTC +08:00)
View GitHub Profile
@atwayne
atwayne / teamcity.process.trigger.ps1
Created May 18, 2016 17:34
A powershell script to trigger TeamCity build via REST API
$user = "username"
$password = "password"
$teamCityHost = "http://teamcity:8082/"
$pair = "$($user):$($password)"
$encodedCreds = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($pair))
$basicAuthValue = "Basic $encodedCreds"
$headers = @{
"Authorization" = $basicAuthValue;
"Accept" = "application/xml";
@atwayne
atwayne / services.ongoing.js
Created May 20, 2015 11:07
services.ongoing.js
var jiaker = window.jiaker || {};
jiaker.services = angular.module('services', ['ngResource', 'ngCordova']);
// ------------------------------------
// CityService
// ------------------------------------
// GET /city
// GET /city/location/{latitude}/{longitude}
jiaker.services.factory('CityService', function ($resource) {
var city = $resource(jiaker.settings.service + '/city');