Skip to content

Instantly share code, notes, and snippets.

View gsora's full-sized avatar
🤙
Vibin'

Gianguido Sorà gsora

🤙
Vibin'
View GitHub Profile
use pddb::Pddb;
use std::io::Read;
use std::io::Write;
use xous::Error;
pub struct PddbMap {
basis_name: String,
dict_name: String,
pddb_inst: pddb::Pddb,
}
@gsora
gsora / .config
Last active May 20, 2020 11:42
OP-TEE Linux config for USB Armory Mk2
#
# Automatically generated file; DO NOT EDIT.
# Linux/arm 5.4.38 Kernel Configuration
#
#
# Compiler: arm-linux-gnueabihf-gcc (Ubuntu 9.2.1-9ubuntu2) 9.2.1 20191008
#
CONFIG_CC_IS_GCC=y
CONFIG_GCC_VERSION=90201
@gsora
gsora / ckv.c
Created April 12, 2020 17:43
extremely stupid C key-value store
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define PREAMBLE_DELIM "#preamble#"
#define PREAMBLE_DELIM_LEN 11
#define SPLIT_TOKEN "\n"
#define T PREAMBLE_DELIM"\n""a:int:1\nb:string:31\nc:bool:1\n"PREAMBLE_DELIM"\na:1234\nb:ciaociao ciao come va la vita?\n"
#define FIELD_SZ 128
#define PREAMBLE_LINE_FMT "%[^:]:%[^:]:%lli\n"
@gsora
gsora / vardown.go
Created March 4, 2020 17:10
Markdown preprocessor with variable replacement
package main
import (
"errors"
"fmt"
"io/ioutil"
"log"
"os"
"regexp"
"strings"
### Keybase proof
I hereby claim:
* I am gsora on github.
* I am gsora (https://keybase.io/gsora) on keybase.
* I have a public key ASBQDIK90FrOgGYYz58bSoXShCojDMEgUkRl7sz_CpLVDgo
To claim this, I am signing this object:
Loopback HTTP GET
```
goos: linux
goarch: amd64
pkg: client-localhost
Benchmark_doLoopback-2 6195 209226 ns/op 2617 B/op 35 allocs/op
PASS
ok client-localhost 1.327s
Success: Benchmarks passed.

Keybase proof

I hereby claim:

  • I am gsora on github.
  • I am gsora (https://keybase.io/gsora) on keybase.
  • I have a public key ASC2KIdkmLowEGxM9FgSwwB_pJDm5PAQI5_9tcOAIVwPJAo

To claim this, I am signing this object:

Keybase proof

I hereby claim:

  • I am gsora on github.
  • I am gsora (https://keybase.io/gsora) on keybase.
  • I have a public key ASC0SzXCTpTuayEsBGJ5mWMmBKAs44e-rGqDSX8bRSo3CQo

To claim this, I am signing this object:

{
"positions": [{
"id": 4,
"status": "open",
"date": "2016-02-26T17:50:12.000Z",
"amount": 0.01,
"base_price": 341.0,
"type": "long",
"leverage": 2.5,
"profit_loss": 3.35,