Skip to content

Instantly share code, notes, and snippets.

@trumae
trumae / OpenSSLExample.cpp
Created December 15, 2021 13:01 — forked from irbull/OpenSSLExample.cpp
Code signing and verification with OpenSSL
#include <iostream>
#include <openssl/aes.h>
#include <openssl/evp.h>
#include <openssl/rsa.h>
#include <openssl/pem.h>
#include <openssl/ssl.h>
#include <openssl/bio.h>
#include <openssl/err.h>
#include <assert.h>
@trumae
trumae / main.go
Last active June 6, 2019 23:20
Golang - ponteiros que trocam de valor
package main
func main() {
var x [10]int
var y = &x[2] //ref to array contetn
var z = y // ref copy
println(&x, y, z)
a(x)
println(&x, y, z)
@trumae
trumae / lispchain.lisp
Created November 4, 2018 23:11 — forked from BusFactor1Inc/lispchain.lisp
Lispchain - a blockchain implementation (sketch) in Common Lisp
;;
;; scheme coin - a lispchain (aka blockchain) implementation
;;
;; Burton Samograd
;; burton.samograd@gmail.com
;; Copyright - 2017
;;
;; Interested in helping out with the code? Email me.
;;
;; Bitcoin: 1HzWXjoQjzdLBm1eKeuWFrZx96kiop5GGy
@trumae
trumae / scheme-coin.lisp
Created November 4, 2018 23:08 — forked from BusFactor1Inc/scheme-coin.lisp
A Common Lisp Blockchain - Scheme Coin
;;
;; scheme coin - a common lisp blockchain
;;
;; Burton Samograd
;; 2017
(load "~/quicklisp/setup.lisp")
(defconstant *coin-name* "Scheme Coin")
@trumae
trumae / sshd.go
Created November 10, 2015 12:54 — forked from jpillora/sshd.go
Go 1.3 SSH server complete example
// A small SSH daemon providing bash sessions
//
// Server:
// cd my/new/dir/
// #generate server keypair
// ssh-keygen -t rsa
// go get -v .
// go run sshd.go
//
// Client:
@trumae
trumae / sshd.go
Created November 10, 2015 12:53 — forked from nictuku/sshd.go
Go SSH server complete example
package main
import (
"fmt"
"io"
"io/ioutil"
"log"
"code.google.com/p/go.crypto/ssh"
"code.google.com/p/go.crypto/ssh/terminal"