This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script lang='ts'> | |
import { slide } from 'svelte/transition' | |
export let open: boolean = false | |
export function toggle() { | |
open = !open | |
} | |
</script> | |
<a | |
href='#open' | |
on:click|preventDefault={ toggle } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Firesearch brings full-text search to Google App Engine | |
// This sample shows how easy it is to use in JavaScript. | |
// You run this in Cloud Run, it connected to Cloud Firestore, | |
// and you write code that interacts with the Firesearch API | |
// to bring a high performance, highly accurate search experience | |
// to your apps and websites. | |
// add or update a document | |
indexService.putDoc({ | |
indexPath: "firesearch/indexes/my-search-index", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// for more information, see https://firesearch.dev | |
// add or update a document | |
_, err := indexService.PutDoc(PutDocRequest{ | |
IndexPath: "firesearch/indexes/my-search-index", | |
Doc: Doc{ | |
ID: "document-1", | |
SearchFields: []SearchField{ | |
{ | |
Key: "body", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// for more information, see https://firesearch.dev | |
// add or update a document | |
indexService.putDoc({ | |
indexPath: "firesearch/indexes/my-search-index", | |
doc: { | |
id: "document-1", | |
searchFields: [ | |
{ | |
key: "body", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Due to some upgrades that are taking place, Gopherize.me is temporarily unavailable. | |
It will be back this week. | |
Thanks for your patience. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"fmt" | |
"math/rand" | |
"time" | |
) | |
func main() { | |
// all the peeps in a map ensures no duplicates |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Released under MIT License | |
package main | |
import "sync" | |
// asyncFn is a function that can be run asychronously by | |
// async. | |
type asyncFn func() error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"context" | |
"encoding/json" | |
"io/ioutil" | |
"net/http" | |
"strings" | |
"time" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"bufio" | |
"fmt" | |
"os" | |
"os/exec" | |
) | |
var speakers = map[string]bool{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// handleProcess runs the incoming chunk through an exif decoder and | |
// writes the results to the response. | |
func handleProcess(w http.ResponseWriter, r *http.Request) { | |
startOffsetMS, err := strconv.Atoi(r.FormValue("startOffsetMS")) | |
if err != nil { | |
http.Error(w, "exif: "+err.Error(), http.StatusBadRequest) | |
return | |
} | |
endOffsetMS, err := strconv.Atoi(r.FormValue("endOffsetMS")) | |
if err != nil { |
NewerOlder