Skip to content

Instantly share code, notes, and snippets.

View oscarryz's full-sized avatar

Oscar Reyes oscarryz

View GitHub Profile
import java.io.*;
import java.net.URL;
import java.util.*;
import java.util.regex.*;
import javax.servlet.http.*;
import javax.servlet.http.HttpServletResponse;
import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.server.Server;
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;">
<script type="application/javascript">
function random(inRange) {
return Math.floor((Math.random()*inRange)+1);
var input = "elPj";
undefined
var re = /^PJ|JJ/i
undefined
re.test(input)
false
input = "pJz"
"pJz"
re.test(input)
true

Sooo...

I thought it would be easier to setup goimports to use it with vim, and probably it is, but I had a lot of problems on the way.

Here's a quick summary of what I did at the end.

Note: I already had go installed and my GOPATH envrionment variable set.

  1. If fish shell is the default shell change it to something else ( I reverted to bash)
import lombok.Data;

@Data
class Empleado {
    private final Departamento departamento;
    private final String nombre;
}

@Data

class Departamento {

@oscarryz
oscarryz / gist:882711
Created March 23, 2011 06:41
Currently possible in Ryz
import ( java.util.Scanner )
main.App {
main() {
out.print("Como te llamas? ")
a : String = Scanner( System.in ).nextLine()
out.printf("Hola %s %n ", a )
}
}
@oscarryz
oscarryz / gist:908324
Created April 7, 2011 17:57
Inline code block
blocks.IfTrueInline {
main() {
value = true
value.ifTrue((){
out.println("Yeap!, still true")
})
}
}
// Estoy por convertir
1 .+( 1 )
// En
+(1,1)
//Como aparece en: http://goo.gl/MZU5e
//O más bien dicho
@oscarryz
oscarryz / gist:977177
Created May 17, 2011 19:25
Long time waited feature ( this is Ryz not Ruby )
testNull() {
a = null
a . isNull? ( {
out.println("a is null")
})
}
@oscarryz
oscarryz / gist:988144
Created May 24, 2011 04:32
Hoy fue un buen día. Ya tengo parametros en los blocks! ( me falta tipo de retorno )
list.each( ( name : String ) {
out.println( name )
})