Skip to content

Instantly share code, notes, and snippets.

View erikdubbelboer's full-sized avatar

Erik Dubbelboer erikdubbelboer

View GitHub Profile
export function loadPokiSDK() {
const getParameterByName = (name) => {
const match = RegExp(`[?&]${name}=([^&]*)`).exec(window.location.search);
return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
};
const queue = [];
const isLocalhost = window.location.hostname === 'localhost';
window.PokiSDK = new Proxy(
package main
import (
"fmt"
"runtime"
"sync"
"sync/atomic"
"time"
)
@erikdubbelboer
erikdubbelboer / go.mod
Created September 18, 2021 20:15
fasthttp client timeout test
module test
go 1.17
require github.com/valyala/fasthttp v1.30.0
require (
github.com/andybalholm/brotli v1.0.2 // indirect
github.com/klauspost/compress v1.13.4 // indirect
github.com/valyala/bytebufferpool v1.0.0 // indirect
package main
import (
"fmt"
"io"
"io/ioutil"
"net"
"os"
"time"
)
package main
import (
"crypto/rand"
"crypto/rsa"
"crypto/tls"
"crypto/x509"
"crypto/x509/pkix"
"encoding/pem"
"fmt"
CREATE TABLE test (timestamp DateTime, i UInt8) Engine=MergeTree() PARTITION BY toYYYYMM(timestamp) ORDER BY (i);
INSERT INTO test values ('2020-05-13 16:38:45', 1);
SELECT
toTimeZone(timestamp, 'America/Sao_Paulo') AS converted,
timestamp AS original
FROM test
LEFT JOIN (SELECT 2 AS x) AS anything ON x = i
WHERE timestamp >= toDateTime('2020-05-13T00:00:00', 'America/Sao_Paulo');
// +build ignore
package main
import (
"bytes"
"compress/gzip"
"fmt"
"io/ioutil"
"net/http"
package main
import (
"bytes"
"compress/gzip"
"fmt"
"io/ioutil"
"net/http"
"testing"