This is a summary of the guidelines presented by Martin Odersky during his talk Scala with Style.
Run:
brew install gnupg pinentry-macgit config --global user.signingkey <key>git config --global commit.gpgsign truegit config --global gpg.program gpg
Then add the following line to ~/.gnupg/gpg-agent.conf:
pinentry-program /usr/local/bin/pinentry-mac
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
| package test.support; | |
| import com.google.common.io.CharStreams; | |
| import lombok.AllArgsConstructor; | |
| import lombok.SneakyThrows; | |
| import org.hamcrest.BaseMatcher; | |
| import org.hamcrest.Description; | |
| import java.io.IOException; | |
| import java.io.InputStream; |
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
| package com.snaphop.jooq; | |
| import java.sql.Connection; | |
| import java.sql.SQLException; | |
| import java.sql.Statement; | |
| import javax.sql.DataSource; | |
| import org.jooq.ExecuteContext; | |
| import org.jooq.impl.DefaultExecuteListener; |
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
| List list = [ | |
| [id:0, firstName: 'Sachin', lastName: 'Tendulkar', age: 40 ], | |
| [id:1, firstName: 'Sachin', lastName: 'Tendulkar', age: 103 ], | |
| [id:2, firstName: 'Ajay', lastName: 'Tendulkar', age: 48 ], | |
| [id:3, firstName: 'Virendra', lastName: 'Sehwag', age: 5 ], | |
| [id:4, firstName: 'Virendra', lastName: 'Sehwag', age: 50 ], | |
| [id:5, firstName: 'Sachin', lastName: 'Nayyar', age: 15 ] | |
| ] | |
| Collection.metaClass.sort = { boolean mutate, Closure... closures -> |
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
| package grails_filter_tests | |
| import spock.lang.Specification | |
| import org.springframework.beans.factory.config.MethodInvokingFactoryBean | |
| import grails.test.mixin.* | |
| import grails.test.mixin.support.GrailsUnitTestMixin | |
| import grails.test.mixin.web.FiltersUnitTestMixin | |
| @TestFor(SimpleController) | |
| @TestMixin([GrailsUnitTestMixin,FiltersUnitTestMixin]) | |
| @Mock(MySimpleFilters) |
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 CompoundInstanceControllerIntegrationSpec extends ControllerSpec { | |
| static transactional = true | |
| def "saving a new compound instance and compound"() { | |
| setup: | |
| controller.metaClass.message = {args -> "mockMessage"} | |
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
| # ....other stuff here | |
| paginate: 10 |
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
| apt-get install zlib1g-dev | |
| apt-get install g++ | |
| export VENV=$VIRTUAL_ENV | |
| mkdir $VENV/packages && cd $VENV/packages | |
| curl -O http://oligarchy.co.uk/xapian/1.0.16/xapian-core-1.0.16.tar.gz | |
| curl -O http://oligarchy.co.uk/xapian/1.0.16/xapian-bindings-1.0.16.tar.gz | |
| tar xzvf xapian-core-1.0.16.tar.gz |