This file contains 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
# Update Locale/Timezone | |
Menu -> Preferences -> Raspberry Pi Configuration -> Localisation -> Set Locale... or Set Timezone... | |
# Change Keyboard Layout | |
Menu -> Preferences -> Keyboard and Mouse -> Keyboard -> Keyboard Layout | |
# Change password | |
Menu -> Preferences -> Raspberry Pi Configuration -> System -> Change Password... | |
# Access the outside world! |
This file contains 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
@Mock(UriFilters) | |
@TestFor(MyController)// Need a controller to test filters | |
class UriFiltersSpec extends Specification { | |
void "myFilter() should set the names of the controller and action"() { | |
setup: | |
request.requestURI = '/some/path/here' | |
when: | |
withFilters(controller: 'my', action: 'index') { controller.index() } |
This file contains 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
request.requestURI = '/some/path/here' |
This file contains 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
@Mock(UriFilters) | |
@TestFor(MyController)// Need a controller to test filters | |
class UriFiltersSpec extends Specification { | |
void "myFilter() should set the names of the controller and action"() { | |
when: | |
withFilters(uri: '/some/path/**') { controller.index() } | |
then: | |
response.getHeader('controllerName') == 'my' |
This file contains 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 controller | |
class UriFilters { | |
def filters = { | |
myFilter(uri: '/some/path/**') { | |
before = { | |
response.setHeader('controllerName', controllerName) | |
response.setHeader('actionName', actionName) | |
// Do something |
This file contains 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 MyController { | |
def index() { | |
render 'success' | |
} | |
} |
This file contains 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
environments { | |
test { | |
dataSource { | |
pooled = true | |
username = "yourUser" | |
password = "yourPass" | |
dbCreate = "create" | |
url = "jdbc:postgresql://localhost:5432/test_db${System.properties.getProperty('test.suffix') ?: ''}" | |
jndiName = null | |
} |
This file contains 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
# Exports | |
export PSQL_HOME=/Library/PostgreSQL/9.3 | |
export PATH=/Library/PostgreSQL/9.3/bin:$PATH | |
export PGPASSWORD=yourPass # Ideally this should live in the .pgpass file | |
# Drop the database | |
dropdb test_db${BUILD_NUMBER} --username=yourUser --if-exists |
This file contains 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
# Exports | |
export GRAILS_HOME=/path/to/grails | |
export PATH=$PATH:${GRAILS_HOME}/bin | |
export PSQL_HOME=/Library/PostgreSQL/9.3 | |
export PATH=$PATH:${PSQL_HOME}/bin | |
export PGPASSWORD=yourPass # Ideally this should live in the .pgpass file | |
# Create the database |
This file contains 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
void doSomething(def foo, def newParam = null) { | |
println foo | |
} | |
void doSomethingAgain(def baz, def newParam) { | |
println baz | |
} | |
doSomething() // Throws MethodSelectionException | |
doSomethingAgain('Test') // Throws MissingMethodException |