Skip to content

Instantly share code, notes, and snippets.

View gsora's full-sized avatar
🤙
Vibin'

Gianguido Sorà gsora

🤙
Vibin'
View GitHub Profile
#!/usr/bin/env python3
import requests
import json
import datetime
import time
address="c269433f56c29d752ce59895edce82fa992f9dcdc2734a8e6a9ee337b7e44de33c3afe193883"
dataURL="https://siamining.com/api/v1/addresses/"
intervals={
@gsora
gsora / openvpn-libressl-static.sh
Last active March 4, 2020 15:10
Builds OpenVPN 2.4.2 with LibreSSL 2.4.5 statically on OpenBSD 6.1
#!/bin/sh
# Originally written by https://image.rayservers.com/ssl/vpn/openvpn+libressl+musl-static-compile.sh
# Dependencies: wget
set -e
set -x
[ ! -d ~/openvpn-libressl ] && mkdir ~/openvpn-libressl
cd ~/openvpn-libressl
file = open("usb_hid_keys.h", "r")
for line in file:
goodline = line[8:].split(" ")
if line.startswith("#define ") and len(goodline)>1:
key = goodline[0]
value = ""
for i in range(1, len(goodline)):
if goodline[i] == "":
continue
Benchmark started on Mon Apr 18 13:19:45 UTC 2016
Full benchmark log: /home/gsora/bench.log
System Info
-----------
Processor : ARMv7 Processor rev 2 (v7l)
CPU Cores : 4
Frequency : MHz
Memory : 2022 MB
Swap : MB
@gsora
gsora / clone-org
Last active March 21, 2016 13:29
Clone all the repos of given GitHub organizations
#!/usr/bin/env python3
import json
import argparse
import os
from urllib import request as r
from urllib import error
from subprocess import call as execute
parser = argparse.ArgumentParser(description='Clone all the repos of given GitHub organizations, space-divided')
package main
import (
crypto "crypto/rand"
"fmt"
"math/big"
"runtime"
"time"
)
package main
import (
crypto "crypto/rand"
"fmt"
"math/big"
"time"
)
func main() {
package main
import (
"fmt"
"time"
)
func main() {
for i := 0; i < 1000; i++ {
beforeGoroutine := time.Now()
#################################
#
# Backend
#
#################################
# Backend to use: "xrender" or "glx".
# GLX backend is typically much faster but depends on a sane driver.
backend = "glx";
class lista:
listafica = []
def app(self, k):
self.listafica.append(k)
def rLista(self):
return self.listafica