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
| def grailsApplication // Injected by default in controllers, accessible as a regular bean elsewhere | |
| assert grailsApplication.mainContext.getBeanDefinition('sessionFactory') instanceof org.springframework.beans.factory.support.GenericBeanDefinition | |
| // Have I any non-singleton bean ? | |
| grailsApplication.mainContext.getBeanDefinitionNames().any { | |
| !grailsApplication.mainContext.getBeanDefinition(it).singleton | |
| } | |
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
| module "[email protected]:deigote/fish-common.git" fish-common | |
| module "[email protected]:deigote/gh-issues-flow.git" gh-issues-flow |
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
| ~/.config/fish/fish-modules/update_modules.fish |
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
| # Some other fish configuration goes here | |
| # Fish modules | |
| source $HOME/.config/fish/fish-modules/add_modules_to_path.fish |
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
| cd $HOME/.config/fish | |
| git submodule add [email protected]:deigote/fish-modules.git fish-modules | |
| git ci fish-modules .gitmodules -m 'Added fish-modules as a submodule for convenience' |
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
| private static File findOuputFile() { | |
| this.<File>logAndReturn('info', { File outputFile -> "Using '$outputFile' as output file" }) { | |
| new File("${System.getProperty('outputDir')}/memolo.html") | |
| } | |
| } | |
| private static <O> O logAndReturn( | |
| String logLevel, | |
| @ClosureParams(ThirdParam.FirstGenericType.class) Closure<String> stringMessageGenerator, | |
| Closure<O> resultProducer |
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
| class ExpandoWithDelegate { | |
| private delegate | |
| private Map<String, Closure> mockedMethods | |
| ExpandoWithDelegate(delegate) { | |
| this.delegate = delegate | |
| this.mockedMethods = [:] | |
| } | |
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 static org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsHibernateUtil.unwrapIfProxy | |
| public class DomainClassLookupPropertyEditor extends PropertyEditorSupport { | |
| Class domainClass | |
| String property | |
| Boolean doAssert = true | |
| String getAsText() { | |
| value."$property" |
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 class DomainClassLookupPropertyEditor extends PropertyEditorSupport { | |
| Class domainClass | |
| String property | |
| Boolean doAssert = true | |
| String getAsText() { | |
| value."$property" | |
| } | |
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
| class Car { | |
| static hasMany = [brands: Brand] | |
| } | |
| class Brand { } | |
| class CarService { | |
| def searchCars(int firstResult, int maxResults) { | |
| Car.createCriteria().list { | |
| createAlias('brands', 'brands', CriteriaSpecification.INNER_JOIN) |
OlderNewer