My collection of useful Confluence user macros
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
package com.jarv.colorprinter | |
/** | |
* | |
* Valid parameters: | |
* | |
* Colors: | |
* "BLACK", "RED", "GREEN", "YELLOW", "BLUE", "PURPLE", "CYAN", "WHITE" | |
* Only the last color parameter will be used | |
* |
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
import java.util.Comparator; | |
/** | |
* Both arguments need to be version Strings, formatted like "7.5.3", "2.3" "8.0.0.42"... | |
* | |
* If a version has more number length, it could be considered newer. Examples: | |
* "2.5" vs "2.5.1" -> a is older -> Negative int returned | |
* "2.6" vs "2.5.1" -> a is newer -> Positive int returned | |
* "2.5" vs "2.5.0" -> equal -> Zero returned | |
* |
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
using System.Collections.Generic; | |
using UnityEngine; | |
public class ServiceLocator : MonoBehaviour { | |
private Dictionary<System.Type,Object> cache = new Dictionary<System.Type,Object>(); | |
private static ServiceLocator _singleton; | |
private static ServiceLocator singleton { | |
get { |
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
Create a Script Fragment that calls the above JS code with the context "jira.view.issue". |
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
import java.awt.Robot | |
import java.awt.event.InputEvent | |
/* | |
CLICK LIKE CRA-ZY | |
*/ | |
def sleepAmount = 200 | |
def clicks = 1000 |
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
using UnityEngine; | |
public class LazyngletonBehaviour<T> : MonoBehaviour where T : LazyngletonBehaviour<T> { | |
private static T _instance; | |
public static T Instance { | |
get{ | |
if(_instance == null){ | |
GameObject newInstance = new GameObject(); | |
_instance = newInstance.AddComponent<T>(); |
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
import os | |
from pathlib import Path | |
textToSearch = "LinkJiraIssue" | |
# Busca los archivos llamados atlassian-plugin.xml desde el directorio activo (incluyendo directorios hijos) | |
xmls = list(Path(".").rglob("atlassian-plugin.xml")) | |
for r in xmls: | |
f = open(r, "r") |
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
@RunWith(Parameterized.class) | |
public class CalculatorTest { | |
enum Type {SUBSTRACT, ADD}; | |
@Parameters | |
public static Collection<Object[]> data(){ | |
return Arrays.asList(new Object[][] { | |
{Type.SUBSTRACT, 3.0, 2.0, 1.0}, | |
{Type.ADD, 23.0, 5.0, 28.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
package main | |
import ( | |
"fmt" | |
"time" | |
"github.com/fatih/color" | |
) | |
var startTime = time.Hour * 8 |