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
void setBuildStatus(String message, String context, String state) { | |
// add a Github access token as a global 'secret text' credential on Jenkins with the id 'github-commit-status-token' | |
withCredentials([string(credentialsId: 'github-commit-status-token', variable: 'TOKEN')]) { | |
// 'set -x' for debugging. Don't worry the access token won't be actually logged | |
// Also, the sh command actually executed is not properly logged, it will be further escaped when written to the log | |
sh """ | |
set -x | |
curl \"https://api.github.com/repos/org/repo/statuses/$GIT_COMMIT?access_token=$TOKEN\" \ | |
-H \"Content-Type: application/json\" \ | |
-X POST \ |
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
<input type="text" class="form-control" ng-model="name" ng-required="{{nameRequired}}"> | |
[...] | |
<input type="text" class="form-control" ng-model="email" ng-required="{{emailRequired}}"> |
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
var NameEmailDirective = function() { | |
var directive = {}; | |
directive.restrict = 'E'; | |
directive.template = nameEmailTemplate; | |
directive.scope= { 'name': '=', 'email': '='} | |
return directive; | |
} |
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
<div class="form-group"> | |
<label>Name</label> | |
<input type="text" class="form-control" ng-model="name"> | |
</div> | |
<div class="form-group"> | |
<label>Email</label> | |
<input type="text" class="form-control" ng-model="email"> | |
</div> |
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
<md-autocomplete | |
md-selected-item="selectedItem" | |
md-search-text="searchText" | |
md-items="item in ctrl.items" | |
md-min-length="0"> | |
<md-item-template> | |
{{item}} | |
</md-item-template> | |
</md-autocomplete> | |
<bind-expression name="selectedItem" ng-required="true" expression="selectedItem" ng-model="ctrl.selectedItem" /> |
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
.directive("bindExpression", function($parse) { | |
var directive = {}; | |
directive.restrict = 'E'; | |
directive.require = 'ngModel'; | |
directive.link = function(scope, element, attrs, ngModel) { | |
scope.$watch(attrs.expression, function (newValue) { | |
ngModel.$setViewValue(newValue); | |
}); | |
ngModel.$render = function() { | |
$parse(attrs.expression).assign(ngModel.viewValue); |
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
<input type=”text” value.two-way=”text”> |
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
<input type=”text” ng-model=”ctrl.text”> |
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
new AddressPanel() | |
.withHeader(translate('PrimaryAddress')) | |
.bind(() => { ctrl.person.address }); |
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
view: function(ctrl) { | |
return m("div", [ | |
ctrl.pages().map(function(page) { | |
return m("a", {href: page.url}, page.title); | |
}), | |
m("button", {onclick: ctrl.rotate}, "Rotate links") | |
]); | |
} |
NewerOlder