This is item number one
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 tracer | |
import ( | |
"fmt" | |
"log" | |
"runtime" | |
"strings" | |
) | |
// DefaultTracer is the default tracer and has a call |
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 engine | |
import ( | |
"bytes" | |
"encoding/binary" | |
"encoding/json" | |
"errors" | |
"fmt" | |
"reflect" | |
"sort" |
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" | |
"strconv" | |
) | |
func main() { | |
fmt.Println() |
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 logging | |
import ( | |
"fmt" | |
"io" | |
"log" | |
"os" | |
"path/filepath" | |
"runtime" | |
) |
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" | |
"net/http" | |
) | |
func homeHandler() http.Handler { | |
fn := func(w http.ResponseWriter, r *http.Request) { | |
// implement handler logic here... |
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
// You can edit this code! | |
// Click here and start typing. | |
package main | |
import ( | |
"errors" | |
"fmt" | |
"log" | |
"os" | |
"strings" |
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
#!/usr/bin/env bash | |
# | |
# picam-capture.sh | |
# to enable this at startup, add the line below to your rc.local file: | |
# sudo vim /etc/rc.local | |
# bash /full/path/to/this/file.sh # add this line | |
# configurable options | |
timestamp = "-a 12" # overlay a 12hr date/timestamp |
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
// IndexSpans can be used to index spans of text based around a delimiter of your | |
// choice. The size argument allows you to tune it a bit and have some control over | |
// the overhead used by the function. The delimiter is not included in the returned | |
// span bound set and empty lines are not ignored. | |
func IndexSpans(r io.Reader, delim byte, size int) ([]Span, error) { | |
// Setup initial variables for the function | |
var id, beg, end int | |
// Drop is a helper func used to drop the correct number of bytes. Right now it | |
// is mostly used to handle the special case of \n and \r\n | |
drop := func(p []byte, c byte) int { |
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 bin | |
// This package provides mapping functions to work with slices of uint | |
// types. It allows the getting, setting and transforming of various | |
// uint types such as uint, uint16, uint32 and uint64. Right now, this | |
// set of functions uses the LittleEndian encoding format, but future | |
// versions of this will have support for both the LittleEndian and | |
// BitEndian byte order. | |
// BinMapU16Fn is the mapping function signature for an uint16 |