This file contains hidden or 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
public doCall(java.lang.Object arg0) { //(Ljava/lang/Object;)Ljava/lang/Object; | |
<localVar:index=0 , name=this , desc=LTryCatchProblem$_test_closure1;, sig=null, start=L1, end=L2> | |
<localVar:index=1 , name=it , desc=Ljava/lang/Object;, sig=null, start=L1, end=L2> | |
<localVar:index=2 , name=collector , desc=LErrorCollector;, sig=null, start=L3, end=L2> | |
<localVar:index=3 , name=e , desc=Ljava/lang/Throwable;, sig=null, start=L4, end=L5> | |
<localVar:index=5 , name=e , desc=Ljava/lang/Throwable;, sig=null, start=L6, end=L7> | |
<localVar:index=8 , name=e , desc=Ljava/lang/Throwable;, sig=null, start=L8, end=L9> | |
TryCatch: L10 to L11 handled by L11: java/lang/Throwable | |
TryCatch: L10 to L11 handled by L12: Type is null. |
This file contains hidden or 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
# check if jabba is installed | |
Get-Command -ErrorAction Stop jabba > $null | |
function Resolve-PathSymlink | |
{ | |
param( | |
[string] | |
$Path | |
) | |
$item = Get-Item $Path |
This file contains hidden or 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
function Jabba-Use | |
{ | |
param( | |
[Parameter(Mandatory)] | |
[string]$Version | |
) | |
jabba use $Version | |
} |
This file contains hidden or 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
# What is this? | |
# | |
# This is a script I wrote to automate the process of removing images and soundfiles from mods, | |
# so that they can be uploaded to factorio.zone without taking forever or even exceed the max-upload size. | |
# It also creates a mod-settings.zip so that your mod-settings.dat (Startup Settings) are available on the server. | |
# | |
# How to use | |
# | |
# Download the script and put it somewhere on you harddrive, e.g., C:\temp\factorio | |
# Open a powershell prompt "Win+x, i" or just type powershell in the startmenu. |
This file contains hidden or 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 spock.lang.* | |
class ASpec extends Specification { | |
def "hello world"() { | |
expect: true | |
} | |
} |
This file contains hidden or 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
#!/usr/bin/env groovy | |
import groovy.transform.Immutable | |
import java.util.regex.Pattern | |
@Immutable | |
class Version implements Comparable<Version> { | |
static Pattern NAME_AND_MAJOR_VERSION = ~/^(?<nameVersionPrefix>\w+-(?<major>\d+))(?<remainder>.*)/ | |
static Pattern VERSION_NUMBER_ELEMENT = ~/\D*(\d+)\D*/ | |
String version |
This file contains hidden or 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
Art of Harmony: AGOAG | |
Breathing Skill: OAG | |
Art of Drunkness: OAA | |
Golden Accupuncture: GOGAOA | |
Art of Marrow Refining: GAOGG | |
Poison Proof Spell: GGAOA | |
Heart Burning Spell: GGA | |
Bionic Pentaform: AGOGA | |
Dragon Tiger Hunt: AGOO | |
Art of Heartflame: AOOGGA |
This file contains hidden or 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
#!/usr/bin/env groovy | |
/** | |
* Usage: groovy <scriptName> [port] path-to-zip-file | |
* | |
* This script starts a http server that serves the contents of a zip file. | |
* The zip file is specified as a command-line argument. | |
* The server listens on port 8080 by default, but you can adjust it as necessary. | |
* If you pass 0 as the port parameter, then a random port will be selected. | |
* The server serves the files in the zip file and provides directory listing for directories. |
This file contains hidden or 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
// CalculatorSpec.groovy | |
import spock.lang.Specification | |
class CalculatorSpec extends Specification { | |
def "Test calculate method: #a #operation #b = #expectedResult"() { | |
given: "A calculator instance" | |
def calculator = new Calculator() | |
expect: "The calculation should match the expected value" |
OlderNewer