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
import org.springframework.context.MessageSource | |
import org.springframework.web.servlet.i18n.SessionLocaleResolver | |
class I18nService { | |
SessionLocaleResolver localeResolver | |
MessageSource messageSource | |
def msg(String code, String defaultMsg = null, List objs = 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
import org.apache.commons.codec.binary.Base64 | |
class CifradoBase64Service { | |
static transactional = true | |
def ofuscarCadena(String text) { | |
def encrypted = "" | |
try { | |
byte[] encodedBytes = Base64.encodeBase64(text.getBytes()) |
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 Imagen() { | 79 caracteres. | |
| | |
def Imagen(int width, int height, def color='black', def highlight=0) { | | |
| | |
if (width == 0 && height == 0 && color == 'red' && | | |
highlight > 100 && emphasis == 'strong') { | | |
| | |
return true; | | |
} | | |
} | |
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
Buena idea. | |
def foo = estaEsUnaFuncionLarga(def var1, def var2, def var3, | |
def var3, def var4) { | |
println(var1) | |
} | |
def foo = estaEsUnaFuncionLarga( | |
def var1, def var2, def var3, | |
def var3, def var4) { | |
println(var1) |
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
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
double base; | |
double altura; | |
double area; | |
Scanner lectura = new Scanner(System.in); | |
System.out.println("Ingresa la base: "); |
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 com.utilidades | |
/** | |
* Created by arturo.lopez on 06/08/2015. | |
*/ | |
class Utilities { | |
static benchmark = { closure -> | |
def start = System.currentTimeMillis() | |
closure.call() |
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 com.utilidades | |
import java.text.Normalizer | |
import java.util.regex.Pattern | |
/** | |
* Created by arturo.lopez on 17/02/14. | |
*/ | |
class SlugCodec { |
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
function get_mail_info() { | |
coded = "wSog@VqGOKLgwKU.Kg7.7e"; | |
key = "CKjbOQ3f5xWAnR7slHhy6dP0DaTitoXeNFSu9VMkLcEYrI8GJwqg2Um1pvB4Zz"; | |
shift=coded.length; | |
link=""; | |
for (i=0; i<coded.length; i++) { | |
if (key.indexOf(coded.charAt(i))==-1) { | |
ltr = coded.charAt(i); | |
link += (ltr); | |
} else { |
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
FROM java:8 | |
MAINTAINER Arturo López <arthurolg@gmail.com> | |
# Set customizable env vars defaults. | |
# Set Grails version (default: 3.2.8; min: 3.0.0; max: 3.2.8). | |
ENV GRAILS_VERSION 2.5.6 | |
ARG ats | |
# Install Grails | |
WORKDIR /usr/lib/jvm |
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
$(function () { | |
var url = "{URL}"; | |
var success = function(data){ | |
var html = []; | |
data = $.parseJSON(data); | |
$.each(data, function(index, d){ | |
html.push("Title : ", d.title, ", ", | |
"Location : ", d.location, ", ", |
OlderNewer