Skip to content

Instantly share code, notes, and snippets.

View mgroth0's full-sized avatar

Matt Groth mgroth0

View GitHub Profile
@bastman
bastman / ExampleTest.kt
Last active June 4, 2023 21:25
junit5: Testfactory DSL (kotlin) - dynamic, nested tests ...
package com.example
import com.example.testutils.junit5.testFactory
import com.example.testutils.springTest.BootWebMockMvcTest
import mu.KLogging
import org.amshove.kluent.shouldEqual
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.TestFactory
import org.springframework.beans.factory.annotation.Autowired
import java.math.BigDecimal
@Jeff2Ma
Jeff2Ma / alfred-json-format.sh
Created August 11, 2016 12:01
Alfred Script Filter JSON format
#
# Alfred Script Filter JSON format
#
# This example demonstrates all fields available for populating results.
#
# For an in-depth explanation, use the (?) help button to the bottom left.
#
cat << EOB
{"items": [
@bgmort
bgmort / run_multiple_commands.py
Last active November 18, 2017 12:47
Cleaned up version of code posted at https://forum.sublimetext.com/t/run-multiple-commands-command/6848/35. Added support for repeated commands and example key mappings to move/scroll by ten lines.
# run_multiple_commands.py
import sublime, sublime_plugin
# Takes an array of commands (same as those you'd provide to a key binding) with
# an optional context (defaults to view commands) & runs each command in order.
# Valid contexts are 'text', 'window', and 'app' for running a TextCommand,
# WindowCommands, or ApplicationCommand respectively.
class RunMultipleCommandsCommand(sublime_plugin.TextCommand):
def exec_command(self, command):
if not 'command' in command:
raise Exception('No command name provided.')