Skip to content

Instantly share code, notes, and snippets.

@2matzzz
2matzzz / gist:57be6d7e866b84c63559f022c6ff9e61
Created November 27, 2023 07:11
python3 http post server
from http.server import BaseHTTPRequestHandler, HTTPServer
import os
import sys
from urllib.parse import unquote
class SimpleHTTPRequestHandler(BaseHTTPRequestHandler):
def do_POST(self):
file_name = os.path.basename(unquote(self.path))
if file_name:

Keybase proof

I hereby claim:

  • I am 2matzzz on github.
  • I am 2matzzz (https://keybase.io/2matzzz) on keybase.
  • I have a public key ASCwbIugCDY3ZsV8t6iStaVkz2rocD0G-3YFTomomQvlOgo

To claim this, I am signing this object:

package main
import (
"fmt"
"net/http"
"net/http/httputil"
)
func handler(w http.ResponseWriter, r *http.Request) {
var formatted, err = httputil.DumpRequest(r, true)
#include <WioCellLibforArduino.h>
WioCellular Wio;
void setup() {
delay(200);
SerialUSB.begin(115200);
SerialModule.begin(115200);
SerialUSB.println("");
@2matzzz
2matzzz / curl-format
Created March 12, 2018 04:43
curl-format
url_effective\t\t: %{url_effective}\n
http_code\t\t: %{http_code}\n
http_connect\t\t: %{http_connect}\n
time_total\t\t: %{time_total}\n
time_namelookup\t\t: %{time_namelookup}\n
time_connect\t\t: %{time_connect}\n
time_appconnect\t\t: %{time_appconnect}\n
time_pretransfer\t: %{time_pretransfer}\n
time_redirect\t\t: %{time_redirect}\n
time_starttransfer\t: %{time_starttransfer}\n
@2matzzz
2matzzz / gist:45e2c8a02858850275df
Last active January 9, 2018 07:51
Load testing h2o on Raspberry Pi 2

Load testing h2o on Raspberry Pi 2

H2O config

$ cat /etc/h2o/h2o.conf
listen: 8080
http1-request-timeout: 5
package main
import (
"fmt"
"net/url"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials/stscreds"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/s3"
package main
import (
"fmt"
"net/url"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials/stscreds"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/s3"
#!/bin/bash
regex='(s3)://[-A-Za-z0-9\+&@#/%?=~_|!:,.;]*[-A-Za-z0-9\+&@#/%=~_|]'
if [[ $@ =~ $regex ]]
then
aws s3 ls $@ --recursive | grep -v -E "(Bucket: |Prefix: |LastWriteTime|^$|--)" | awk 'BEGIN {total=0}{total+=$3}END{print total/1024/1024/1024" GB"}'
else
echo "format err, input e.g. s3://bucket/path/to/calc"
exit 1
本稿は以下のURLで公開されているGoogleのDremel論文の個人的な日本語訳である。
http://research.google.com/pubs/pub36632.html
本稿から受けたいかなる損害も責任はとりません。
Dremel: Webスケールデータセットのインタラクティブ分析
Sergey Melnik, Andrey Gubarev, Jing Jing Long, Geoffrey Romer,
Shiva Shivakumar, Matt Tolton, Theo Vassilakis
ABSTRACT