Skip to content

Instantly share code, notes, and snippets.

package main
import (
"encoding/csv"
"io"
"log"
"os"
)
func main() {
package main
import (
"fmt"
"io/ioutil"
"log"
"net/http"
)
func main() {
package main
import (
"context"
"flag"
"fmt"
"log"
"os"
"time"
package main
import (
"context"
"flag"
"fmt"
"log"
"os"
"time"
package main
import (
"context"
"flag"
"fmt"
"log"
"os"
"strings"
"time"
@yfuruyama
yfuruyama / Dockerfile
Created April 15, 2019 14:24
Elasticsearch on Cloud Run
FROM elasticsearch:7.0.0
ENV discovery.type single-node
ENV http.port 8080
CMD ["eswrapper"]
apiVersion: serving.knative.dev/v1alpha1
kind: Route
metadata:
name: helloworld-go
namespace: default
spec:
traffic:
- revisionName: helloworld-go-s66mr
percent: 100
name: prod
+---------------------------------------------------+---------------------------------------------------------------+
| tx1 | tx2 |
+---------------------------------------------------+---------------------------------------------------------------+
| spanner> BEGIN; | |
| Query OK, 0 rows affected (0.02 sec) | |
| | |
| | spanner> BEGIN; |
| | Query OK, 0 rows affected (0.91 sec) |
| |
<!DOCTYPE html>
<html>
<head>
<script>
var recognition = new webkitSpeechRecognition();
recognition.lang = 'en-US';
recognition.continuous = true;
recognition.interimResults = true;
recognition.onresult = function(event) {
if (event.results.length > 0) {
@yfuruyama
yfuruyama / gcs_sign_url.go
Created December 10, 2018 06:13
Generate Signed URL (Usage: `go run gcs_sign_url.go </path/to/service_account.json> </bucket/object>`)
package main
import (
"crypto"
"crypto/rand"
"crypto/rsa"
"crypto/sha256"
"crypto/x509"
"encoding/base64"
"encoding/json"