jenkins_url + /api/json?tree=jobs[name,color]
jenkins_url + /job/${job_name}/api/json?tree=builds[number,status,timestamp,id,result]
| # Ask for the user password | |
| # Script only works if sudo caches the password for a few minutes | |
| sudo true | |
| # Install kernel extra's to enable docker aufs support | |
| # sudo apt-get -y install linux-image-extra-$(uname -r) | |
| # Add Docker PPA and install latest version | |
| # sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
| # sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" |
| //Generate a self signed X509 certificate with Bouncy Castle. | |
| // StringBuilder sb = new StringBuilder(); | |
| // | |
| // for (int i = 0; i < pub.length; ++i) | |
| // { | |
| // sb.append(Integer.toHexString(0x0100 + (pub[i] & 0x00FF)).substring(1)); | |
| // } | |
| // | |
| // System.out.println(sb); | |
| // sb.setLength(0); |
| ### http://www.hass.de/content/setup-your-iis-ssl-perfect-forward-secrecy-and-tls-12 | |
| # Add and Enable SSL 3.0 for client and server SCHANNEL communications | |
| md 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0' -Force | |
| md 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Server' -Force | |
| New-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Server' -name 'Enabled' -value '0xffffffff' -PropertyType 'DWord' -Force | |
| New-ItemProperty -path 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\SSL 3.0\Server' -name 'DisabledByDefault' -value 0 -PropertyType 'DWord' -Force | |
| # Add and Enable TLS 1.0 for client and server SCHANNEL communications | |
| md 'HKLM:\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.0' -Force |
| // Returns a function, that, as long as it continues to be invoked, will not | |
| // be triggered. The function will be called after it stops being called for | |
| // N milliseconds. If `immediate` is passed, trigger the function on the | |
| // leading edge, instead of the trailing. | |
| function debounce(func, wait, immediate) { | |
| var timeout; | |
| return function() { | |
| var context = this, args = arguments; | |
| clearTimeout(timeout); |
| # delete local tag '12345' | |
| git tag -d 12345 | |
| # delete remote tag '12345' (eg, GitHub version too) | |
| git push origin :refs/tags/12345 | |
| # alternative approach | |
| git push --delete origin tagName | |
| git tag -d tagName |
| /** | |
| * A generic confirmation for risky actions. | |
| * Usage: Add attributes: ng-really-message="Are you sure"? ng-really-click="takeAction()" function | |
| */ | |
| angular.module('app').directive('ngReallyClick', [function() { | |
| return { | |
| restrict: 'A', | |
| link: function(scope, element, attrs) { | |
| element.bind('click', function() { | |
| var message = attrs.ngReallyMessage; |
| public class Project | |
| { | |
| public Guid Owner { get; set; } | |
| public Guid Id { get; set; } | |
| public string Name { get; set; } | |
| public DateTime StartDate { get; set; } | |
| public int Status { get; set; } | |
| public List<Task> Tasks { get; set; } | |
| } |
| public class ProjectRepository | |
| { | |
| private CloudTable table; | |
| public ProjectRepository() | |
| { | |
| var connectionString = "..."; | |
| CloudStorageAccount storageAccount = CloudStorageAccount.Parse(connectionString); | |
| var client = storageAccount.CreateCloudTableClient(); |
| Set-ExecutionPolicy RemoteSigned | |
| $mongoDbPath = "C:\MongoDB" | |
| $mongoDbConfigPath = "$mongoDbPath\mongod.cfg" | |
| $url = "http://downloads.mongodb.org/win32/mongodb-win32-x86_64-2008plus-2.4.9.zip" | |
| $zipFile = "$mongoDbPath\mongo.zip" | |
| $unzippedFolderContent ="$mongoDbPath\mongodb-win32-x86_64-2008plus-2.4.9" | |
| if ((Test-Path -path $mongoDbPath) -eq $True) | |
| { |