Skip to content

Instantly share code, notes, and snippets.

#include "greeter.h"
#include <stdio.h>
int greet(const char *name, int year, char *out) {
int n;
n = sprintf(out, "Greetings, %s from %d! We come in peace :)", name, year);
return n;
}
@mattheusv
mattheusv / main.go
Last active June 7, 2019 11:53
playing with Go runtime
package main
import "runtime"
func main() {
var x [10]int
var y = &x[2] //ref to array contetn
var z = y // ref copy
println(&x, y, z) //will print reference memory address
@mattheusv
mattheusv / main.go
Last active June 7, 2019 12:31
cross plataform compile with Go
package main
func main() {
say()
}
@mattheusv
mattheusv / hello.asm
Created June 19, 2019 02:55
Hello World with Assembly
section .data
text db "Hello World",10
section .text
global _start
_start:
mov rax, 1
mov rdi, 1
mov rsi, text
@mattheusv
mattheusv / main.go
Created August 23, 2019 01:11
goroutines-requests
package main
import (
"bytes"
"encoding/json"
"fmt"
"log"
"net/http"
"runtime"
)

Source: https://gist.github.com/findepi/04c96f0f60dcc95329f569bb0c44a0cd .

quick build

./mvnw -T2C clean install -nsu -DskipTests -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Dair.check.skip-all=true -pl '!:trino-server-rpm,!:trino-docs,!:trino-proxy,!:trino-verifier,!:trino-benchto-benchmarks'

run Trino in a container, quickly

docker rm -f trino; docker run --rm -it --name trino -p 8080:8080 trinodb/trino:438