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
// Read parameter from widget | |
let parameter = args.widgetParameter | |
var parameters = ""; | |
if (parameter) parameters = parameter.split(";") | |
else | |
{ | |
// If no parameters were found, ask the user to put them | |
let w = new ListWidget() | |
error = w.addText("Introduce tu cuenta y token de IndexaCapital separados por un ; en la configuración del Widget") | |
error.font = new Font("Avenir-Book", 11) |
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 humanToCamel(original: String): String = | |
original | |
.foldLeft(("", true)) { | |
case ((acc, upper), e) => (if (e == ' ') acc else if (upper) acc + e.toUpper else acc + e, e == ' ') | |
} | |
._1 |
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) |
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
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
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
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
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
# 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
~/.config/fish/fish-modules/update_modules.fish |
NewerOlder