Skip to content

Instantly share code, notes, and snippets.

@adinauer
adinauer / shortcuts.ahk
Last active December 30, 2020 21:04
AutoHotKey shortcuts (make use of capslock)
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
SetCapsLockState, AlwaysOff
fallback_prevention := 0
caps := 0
;global toggle for caps-modifier (= Capslock key)
import groovy.io.FileType
def projectName = /.*topsecret.*/
def searchRegex = args[0]
Map<String,Set<String>> modulesWithDependencies = [:]
new File('/home/adinauer/repos/topsecret').eachFile(FileType.DIRECTORIES) { module ->
def pomFile = new File(module.absolutePath + '/pom.xml')
${is:importStatic(
org.hamcrest.Matchers.equalTo
)}
${:import(
org.hamcrest.Matcher,
org.hamcrest.FeatureMatcher
)}
public static Matcher<${type_to_match}> ${custom_matcher_name}(${type_of_expected_value} ${expected_value:expected}) {
return new FeatureMatcher<${type_to_match}, ${type_of_expected_value}>(equalTo(${expected_value}), "${expected_message} ", "${field_name}") {
@adinauer
adinauer / ConfigureLogging.php
Created May 18, 2015 05:07
Laravel JSON Logging
<?php namespace App\Bootstrap;
// app/Bootstrap/ConfigureLogging.php
use Illuminate\Log\Writer;
use Illuminate\Contracts\Foundation\Application;
use Illuminate\Foundation\Bootstrap\ConfigureLogging as BaseLoggingConfiguration;
use Monolog\Formatter\JsonFormatter;
use Monolog\Handler\RotatingFileHandler;