Skip to content

Instantly share code, notes, and snippets.

Avatar

Tomasz Kalkosiński SpOOnman

View GitHub Profile
@SpOOnman
SpOOnman / output
Created Dec 19, 2013
Sonar debug output
View output
This file has been truncated, but you can view the full file.
Started by user anonymous
[EnvInject] - Loading node environment variables.
Building in workspace /var/lib/jenkins/jobs/sonar-gerrit-plugin/workspace
Fetching changes from the remote Git repository
Fetching upstream changes from https://github.com/TouK/sonar-gerrit-plugin.git
Checking out Revision 170de847ed8830c77091df09c1ddf53423aabdf9 (origin/master)
Cleaning workspace
Resetting working tree
Parsing POMs
@SpOOnman
SpOOnman / graphite-local-install.sh
Created Jul 9, 2013
How to install Graphite as a user on CentOS 5.5
View graphite-local-install.sh
#!/bin/bash
# How to install Graphite as a user on CentOS 5.5 (with neither internet access and root account)
# --------------------------------------------------------------------------------
# Tomasz Kalkosiński - refaktor.blogspot.com
#
# Graphite is a Scalable Realtime Graphing (http://graphite.wikidot.com/)
# This script is based on two excellent tutorials:
# http://community.webfaction.com/questions/10038/how-to-install-pycairo-in-python27-thanks
@SpOOnman
SpOOnman / RestChartSpec.groovy
Last active Jul 24, 2017
Howto keep session in HttBuilder with cookies
View RestChartSpec.groovy
package eu.spoonman.specs.rest
import groovyx.net.http.ContentType
import groovyx.net.http.Method
import eu.spoonman.connectors.RestConnector
import spock.lang.Specification
import spock.lang.Shared
import spock.lang.Stepwise
@Stepwise
@SpOOnman
SpOOnman / Config.groovy
Created Nov 28, 2012
Use XMLs not groovy scripts with db migration plugin!
View Config.groovy
grails.plugin.databasemigration.updateOnStart = true
grails.plugin.databasemigration.updateOnStartFileNames = ["changelog.groovy"]
// grails.plugin.databasemigration.updateOnStartFileNames = ["changelog.xml"]
View RestJsonCatchController.groovy
class RestJsonCatchController {
def grailsJson() {
render([first: 'foo', second: 5] as grails.converters.JSON)
}
def netSfJson() {
render([first: 'foo', second: 5] as net.sf.json.JSON)
}
}
@SpOOnman
SpOOnman / Book.groovy
Created Oct 18, 2012
Inconsistent Dependency Injection to domain classes with Grails
View Book.groovy
class Book {
def libraryService
String author
String title
int pageCount
Book() {
println("Finished constructor Book()")
}
@SpOOnman
SpOOnman / Signature.groovy
Created Aug 16, 2012
How to user mocks in controller tests
View Signature.groovy
Tweet readTweet(String id) throws TwitterError
@SpOOnman
SpOOnman / BuildConfig.groovy
Last active Oct 7, 2015
Hibernate Envers with Grails 2.1.0
View BuildConfig.groovy
plugins {
// add this if you've packaged a plugin by yourself
runtime ":envers:0.3-SNAPSHOT"
// add this if you want to use plugin from Grails central repository
runtime ":envers:2.1.0"
}
@SpOOnman
SpOOnman / Person.groovy
Created Jul 12, 2012
Groovy private fields and methods are not private
View Person.groovy
class Person {
private String name
public String surname
private Person() {}
private String signature() { "${name?.substring(0, 1)}. $surname"}
public String toString() { "I am $name $surname"}
}
@SpOOnman
SpOOnman / spoonman.xml
Created Sep 8, 2011
My IntelliJ IDEA color scheme
View spoonman.xml
<?xml version="1.0" encoding="UTF-8"?>
<scheme name="spoonman" version="1" parent_scheme="Default">
<option name="LINE_SPACING" value="1.0" />
<option name="EDITOR_FONT_SIZE" value="12" />
<option name="EDITOR_FONT_NAME" value="DejaVu Sans Mono" />
<colors />
<attributes>
<option name="ABSTRACT_CLASS_NAME_ATTRIBUTES">
<value>
<option name="FOREGROUND" value="141496" />
You can’t perform that action at this time.