def jenkinsBase = // Set to Jenkins base URL | |
def jenkinsJob = // Set to Jenkins job name | |
def address = null | |
def response = null | |
def start = 0 // Start at offset 0 | |
def cont = true // This semaphore holds the value of X-More-Data header value | |
try { | |
while (cont == true) { // Loop while X-More-Data value is equal to true | |
address = "${jenkinsBase}/job/${jenkinsJob}/lastBuild/logText/progressiveText?start=${start}" | |
println("${address}") |
MAX_BUILDS = 5 | |
MAX_ENV_BUILDS = 2 | |
Jenkins.instance.getAllItems(org.jenkinsci.plugins.workflow.job.WorkflowJob.class).each { it -> | |
def job = Jenkins.instance.getItemByFullName(it.fullName, Job.class) | |
def limit = (it.fullName =~ /^environment/) ? MAX_ENV_BUILDS : MAX_BUILDS | |
def recent = job.getBuilds().limit(limit) | |
println "Processing job " + it.fullName + " " + it.class + " BuildCount: " + job.getBuilds().size() + " Limit: " + limit | |
<# | |
Prerequisites: PowerShell version 3 or above. | |
License: MIT | |
Author: Michael Klement <[email protected]> | |
DOWNLOAD and DEFINITION OF THE FUNCTION: | |
irm https://gist.github.com/mklement0/8689b9b5123a9ba11df7214f82a673be/raw/Out-FileUtf8NoBom.ps1 | iex | |
The above directly defines the function below in your session and offers guidance for making it available in future |
using System; | |
using System.Security.Cryptography; | |
using System.Xml; | |
namespace RSACryptoServiceProviderExtensions | |
{ | |
public static class RSACryptoServiceProviderExtensions | |
{ | |
public static void FromXmlString(this RSACryptoServiceProvider rsa, string xmlString) | |
{ |
$jobName = 'IisExpressJob' | |
function Start-IisExpress($pathToSource) { | |
Start-Job -Name $jobName -Arg $pathToSource -ScriptBlock { | |
param ($pathToSource) | |
& 'C:\Program Files (x86)\IIS Express\iisexpress.exe' /port:1234 /path:$pathToSource | |
} | |
} | |
function Stop-IisExpress { |
using System; | |
using System.Threading; | |
static class Program { | |
static void Main() { | |
Console.Write("Performing some task... "); | |
using (var progress = new ProgressBar()) { | |
for (int i = 0; i <= 100; i++) { | |
progress.Report((double) i / 100); |
Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.
In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.
Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j
#Transform web.config on build
- Unload the project
- Edit .csproj
- Append figure 1 to the end of the file just before
</Project>
; v12.0 my change depending on your version of Visual Studio - Save .csproj and reload
- Open configuration manager
- Add a new Configuration Name: Base. Copy settings from: Release
- Copy the contents of your web.config
- Right click Web.Config > Add Config Transformation
public enum Cacheability | |
{ | |
NoCache, | |
Private, | |
Public, | |
} |