Skip to content

Instantly share code, notes, and snippets.

View g0t4's full-sized avatar
🏁

Wes Higbee g0t4

🏁
View GitHub Profile
stage 'CI'
node {
git branch: 'jenkins2-course',
url: 'https://github.com/g0t4/solitaire-systemjs-course'
// pull dependencies from npm
// on windows use: bat 'npm install'
sh 'npm install'
@g0t4
g0t4 / links.md
Last active May 10, 2021 08:14
Starting Point Files for Jenkins2 Getting Started course
@g0t4
g0t4 / config.xml
Created July 24, 2016 18:39
Module 2 - What am I? Get this job loaded into Jenkins and running, there are two problems you'll encounter. Raw
<?xml version='1.0' encoding='UTF-8'?>
<project>
<actions/>
<description></description>
<keepDependencies>false</keepDependencies>
<properties/>
<scm class="hudson.plugins.git.GitSCM" plugin="git@2.5.2">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
@g0t4
g0t4 / glossary.md
Last active June 7, 2021 16:49
Consul and related terms
  • Node - a physical or virtual machine that hosts services
    • Nodes also referred to as members.
    • Examples
      • Your computer
      • An AWS EC2 instance
      • A bare metal machine in your private data center
  • Service - executing software that provides utility via an interface
    • Typically long-lived process listening on a port(s)
    • Examples
  • A web server (nginx, apache, iis)
@g0t4
g0t4 / docker-compose.yml
Created May 18, 2016 18:10
TeamCity Docker Compose setup
version: '2'
services:
teamcity:
image: sjoerdmulder/teamcity
ports:
- 8111:8111
teamcity-agent:
image: sjoerdmulder/teamcity-agent
environment:
@g0t4
g0t4 / System.tap.js
Last active April 2, 2021 03:04
SystemJS / jspm course components that might need updates
var normalize = System.normalize;
System.normalize = function (name, parentName, parentAddress) {
console.log("normalize: " + JSON.stringify({
name: name,
parentName: parentName,
parentAddress: parentAddress
}));
return normalize.call(this, name, parentName, parentAddress);
};
@g0t4
g0t4 / gist:a97bcc64dff4ac9394ef
Created November 5, 2014 18:08
Building an QueryAnalysis instances that contain the results of compiling and executing the query, then using this to find rules and rule violations
private QueryAnalysis[] GetQueriesToAnalyze()
{
var queries = _Project.GetRulesInProjectFileAndInRuleFilesAndDeclaredInSourceCode(_Analysis.RulesExtractedFromCode).RootParent;
var activeQueries = queries.GetActiveQueries();
var compiledQueriesByQueryString = GetCompiledQueriesByQueryString(activeQueries);
var justMyCode = queries.ComputeJustMyCode(_Analysis.CodeBase);
return activeQueries
.Select(query => new QueryAnalysis(query, compiledQueriesByQueryString[query.QueryString], justMyCode, _Project))
.ToArray();
@g0t4
g0t4 / ArgumentBuilder.kt
Created October 24, 2014 15:52
Demonstrating one off extension functions in Kotlin for improving readability
public class ArgumentBuilder(private val runnerParameters: Map<String, String>) {
public fun build(): List<String> {
return arrayListOf<String>()
.addIfSet("--Project", RunnerSettings.PROJECT_FILE)
.addIfSet("--Output", RunnerSettings.OUTPUT)
.addFlagIfSet("--Flag1", RunnerSettings.FLAG_1)
.addFlagIfSet("--Flag2", RunnerSettings.FLAG_2)
.addFlagIfSet("--Flag3", RunnerSettings.FLAG_3)
.addMultipleIfSet("--InputFiles", RunnerSettings.INPUTS)