This file contains 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
# Description: Boxstarter Script | |
# Original Author: Jess Frazelle <jess@linux.com> | |
# Modifed by Matt Busche | |
# Last Updated: 4/7/2018 | |
# | |
# Install boxstarter: | |
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force | |
# | |
# You might need to set: Set-ExecutionPolicy RemoteSigned | |
# |
This file contains 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
String getRomanNumeral(int userEnteredNumber) { | |
//Numbers that are needed to reduce the complexity of code. | |
//In some cases the numbers are absolutely necessary (1000, 500, etc) | |
//but numbers like 990, 490 are added to decrease code complexity | |
List numbers = [1000, 999, 990, 900, 500, 499, 490, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1] | |
List romanNumerals = ['M','CMXCIX','XM','CM','D','CDXCIX','XD','CD','C','XC','L','XL','X','IX','V','IV','I'] | |
String romanNumeral = '' | |
int i = 0 | |
while (userEnteredNumber > 0) { | |
while (userEnteredNumber - numbers[i] >= 0) { |
This file contains 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
//no return type specified because it can be an int or a string. | |
//Generally this would be in a class and an exception would be throw rather than | |
//returning a string, but a whole class cannot be ran on the Groovy Console | |
def romanToDecimal(String romanNumber) { | |
Integer newNumber = 0, previousNumber = 0 | |
Map romanToNumberMapping = [M:1000, D:500, C:100, L:50, X:10, V:5, I:1] | |
//convert the string to upper case in case the user entered it in lower case | |
String romanNumeral = romanNumber.toUpperCase() | |
for (Integer oneChar = romanNumeral.length() - 1; oneChar >= 0; oneChar--) { | |
String oneLetter = romanNumeral.charAt(oneChar) |
This file contains 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
# Description: Boxstarter Script | |
# Original Author: Jess Frazelle <jess@linux.com> | |
# Modified by Matt Busche | |
# Last Updated: 11/28/2018 | |
# | |
# Install boxstarter: | |
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force | |
# | |
# You might need to set: Set-ExecutionPolicy RemoteSigned | |
# |
This file contains 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
git branch -r --contains {commit} | |
tells you all of the branches (including remote) that contain a commit |
This file contains 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
@EnableWebSecurity | |
class ApiSecurityConfig extends WebSecurityConfigurerAdapter { | |
@Inject | |
void configureGlobal(AuthenticationManagerBuilder auth) { | |
auth.inMemoryAuthentication() | |
.withUser('svc_acct').password('somePassword').roles('FULL_ACCESS') | |
} | |
@Override | |
protected void configure(HttpSecurity http) { |
This file contains 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
//remove anything with the title "words" from jira view | |
var jq = document.createElement('script'); | |
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
$('.ghx-inner').each(function() { | |
var str = $(this).text().replace(/ /g, '').toUpperCase(); | |
if (str.indexOf("words") >= 0) { | |
$(this).parent().parent().parent().parent().hide(); | |
} |
This file contains 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
//load in jquery | |
var jq = document.createElement('script'); | |
jq.src = "https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"; | |
document.getElementsByTagName('head')[0].appendChild(jq); | |
//hide assigned tickets | |
$('.ghx-avatar').each(function() { | |
var str = $(this)[0].outerHTML; | |
if (str.indexOf("Assignee:") >= 0) { | |
$(this).parent().hide(); |
This file contains 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
git remote update origin --prune && git branch -vv | grep gone] | awk '{print $1}' | xargs git branch -D |
This file contains 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 allElements = document.getElementsByTagName("*"); | |
var allIds = {}; | |
var found = false; | |
for (var i = 0, n = allElements.length; i < n; ++i) { | |
var id = allElements[i].id; | |
if (id) { | |
if (allIds[id] === undefined) { | |
allIds[id] = 1; | |
} else { | |
found = true; |