Skip to content

Instantly share code, notes, and snippets.

View jshinevar's full-sized avatar

James Shinevar jshinevar

View GitHub Profile
@jshinevar
jshinevar / GitVersion.yml
Last active April 22, 2022 02:09
Tag Commits With GitVersion
mode: mainline
tag-prefix: '[vV]'
commit-message-incrementing: Enabled
major-version-bump-message: '\+semver:\s?(breaking|major)'
minor-version-bump-message: '\+semver:\s?(feature|minor)'
patch-version-bump-message: '\+semver:\s?(fix|patch)'
no-bump-message: '\+semver:\s?(none|skip)'
assembly-informational-format: '{Major}.{Minor}.{Patch}'
increment: Patch
branches:
@jshinevar
jshinevar / bitbucket-pipelines.yml
Created January 19, 2021 22:04
bitbucket-pipeline for injecting Semantic Version in a Mulesoft pom.xml
pipelines:
branches:
develop:
- step:
name: Get Semantic Version
script:
- git fetch --unshallow || true
- docker pull gittools/gitversion
- docker run --rm -v "$(pwd):/repo" gittools/gitversion /repo -output json -showvariable FullSemVer > version.txt
services:
@jshinevar
jshinevar / AzureDevOpsStarterBuildPipeline.yml
Created December 13, 2019 12:51
What the starter pipeline looks like in Azure DevOps
# Starter pipeline
# Start with a minimal pipeline that you can customize to build and deploy your code.
# Add steps that build, run tests, deploy, and more:
# https://aka.ms/yaml
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
@jshinevar
jshinevar / LeagueTrackrResourceGroup.json
Created December 11, 2019 22:23
ARM Template for the initial resource group
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"resourceGroupName": {
"type": "string"
},
"resourceGroupEnvironment": {
"type": "string"
},
@jshinevar
jshinevar / LeagueTrackrAzureTemplate.json
Created December 11, 2019 14:34
The default Azure Resource Manager Template provided by Azure.
{
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"sites_LeagueTrackr_DEV_name": {
"defaultValue": "LeagueTrackr-DEV",
"type": "String"
},
"components_LeagueTrackr_DEV_name": {
"defaultValue": "LeagueTrackr-DEV",
@jshinevar
jshinevar / defaultAngularAppPipeline.yml
Created October 24, 2019 03:32
This is the default YAML file created for building an Angular App using Azure DevOps
# Node.js with Angular
# Build a Node.js project that uses Angular.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
trigger:
- master
pool:
vmImage: 'ubuntu-latest'
SELECT DISTINCT Code
, MAX(Date) OVER (PARTITION BY Code) Date
FROM QueryTable
@jshinevar
jshinevar / EuclicianGCD.java
Created June 10, 2017 17:22
Euclidean GCD
import java.util.Scanner;
/**
* Created by James Shinevar on 6/10/17.
* james.shinevar@gmail.com
* http://jamesshinevar.com
*/
public class GCDMain {
public static long FinalGCD;
@jshinevar
jshinevar / GCD.java
Last active June 10, 2017 16:38
Greatest Common Divisor Brute Force Method
import java.util.Scanner;
/**
* Created by James Shinevar on 6/10/17.
* james.shinevar@gmail.com
* http://jamesshinevar.com
*/
public class GCDMain {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
//https://stackoverflow.com/questions/767999/random-number-generator-only-generating-one-random-number
public static class StaticRandom
{
private static int seed;
private static ThreadLocal<Random> threadLocal = new ThreadLocal<Random>
(() => new Random(Interlocked.Increment(ref seed)));
static StaticRandom()
{