Skip to content

Instantly share code, notes, and snippets.

Avatar
🤙
Vibin'

Gianguido Sora' gsora

🤙
Vibin'
View GitHub Profile
@gsora
gsora / .config
Last active May 20, 2020
OP-TEE Linux config for USB Armory Mk2
View .config
#
# 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 Apr 12, 2020
extremely stupid C key-value store
View ckv.c
#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 Mar 4, 2020
Markdown preprocessor with variable replacement
View vardown.go
package main
import (
"errors"
"fmt"
"io/ioutil"
"log"
"os"
"regexp"
"strings"
View gist:4c55a205467921f29f57afba0efea62a
### 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:
View Loopback VS Unix Sockets HTTP GET
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.
View keybase.md

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:

View keybase.md

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:

View gist:e73eecf7ad7182961fa841921ea3ede4
{
"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,
View siamining.py
#!/usr/bin/env python3
import requests
import json
import datetime
import time
address="c269433f56c29d752ce59895edce82fa992f9dcdc2734a8e6a9ee337b7e44de33c3afe193883"
dataURL="https://siamining.com/api/v1/addresses/"
intervals={