Skip to content

Instantly share code, notes, and snippets.

View pzentenoe's full-sized avatar

pzenteno pzentenoe

View GitHub Profile
@pzentenoe
pzentenoe / token-util.go
Last active October 1, 2018 19:05 — forked from cryptix/LICENSE
Ejemplo de codigo de jwt generacion y validacion
package main
// using asymmetric crypto/RSA keys
import (
"crypto/rsa"
"fmt"
"io/ioutil"
"log"
"net/http"
@pzentenoe
pzentenoe / comunas.json
Created July 21, 2018 17:08 — forked from gonzalo-bulnes/comunas.json
Comunas de Chile (seed Ruby on Rails, JSON) - (see also https://github.com/gonzalo-bulnes/chilean_cities)
[
{
"name": "Arica",
"code": "15101",
"provincia": "Arica",
"region": "Arica y Parinacota",
"region_number": "XV",
"region_iso_3166_2": "CL-AP"
},
{
@pzentenoe
pzentenoe / comunas-regiones.json
Created July 21, 2018 17:08 — forked from juanbrujo/comunas-regiones.json
Comunas y regiones de chile JSON
{
"regiones": [{
"region": "Arica y Parinacota",
"comunas": ["Arica", "Camarones", "Putre", "General Lagos"]
},
{
"region": "Tarapacá",
"comunas": ["Iquique", "Alto Hospicio", "Pozo Almonte", "Camiña", "Colchane", "Huara", "Pica"]
},
package main
import (
"fmt"
"io"
"os"
)
var path = "/Users/novalagung/Documents/temp/test.txt"
@pzentenoe
pzentenoe / mgoExample.go
Created November 6, 2017 17:57 — forked from border/mgoExample.go
mgo example
package main
import (
"fmt"
"labix.org/v2/mgo"
"labix.org/v2/mgo/bson"
"time"
)
type Person struct {
@pzentenoe
pzentenoe / MyUnitTest.java
Last active September 15, 2017 15:47
Uso de Mockito doAnswer() callbacks
import org.mockito.Mockito;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.stubbing.Answer;
import org.testng.Assert;
import org.testng.annotations.Test;
public class MyUnitTest {
int executions;
class ServiceA {
final ServiceB runner;