Instantly share code, notes, and snippets.

View td-agent.conf
#
# Example fluentd config file for nginx access log injection into Google Bigquery
# collecting nginx access log
<source>
@type tail
tag accesslogs-rickts-dev-box
path /var/log/nginx/access.log
format apache
buffer_type file
View slackweatherbot.go
package slackweatherbot
import (
owm "github.com/briandowns/openweathermap"
"golang.org/x/net/context"
"google.golang.org/appengine"
"google.golang.org/appengine/log"
"google.golang.org/appengine/urlfetch"
"net/http"
"os"
View slackaccessloglooker.go
package main
import (
"encoding/json"
"fmt"
"log"
"net/http"
"strings"
"time"
)
View analyticsdumper.go
//
// NOTE: go here for an update http://code.rickt.org/post/142445693275/updated-golang-code-to-query-ga-data-via-the
// this gist still works but has a lot of extra fluff you don't need
// http://code.rickt.org/post/142445693275/updated-golang-code-to-query-ga-data-via-the is what you really want
//
package main
import (
"flag"
"fmt"
"golang.org/x/oauth2"
View slackminisniffer.go
package main
import (
"fmt"
"github.com/nlopes/slack"
)
func main() {
// create new slack object & connect
api := slack.New("TOKEN_REDACTED")
api.SetDebug(true)
rtm := api.NewRTM()
View japan-timebot-simple.go
// http://japan-timebot-simple.appspot.com
package japantime
import (
"fmt"
"net/http"
"time"
)
View query-arma3-server.go
package main
import (
"flag"
"fmt"
steam "github.com/kidoman/go-steam"
"sort"
)
var addresses = []string{
View displaytimeindifftz.go
package main
import (
"fmt"
"time"
)
const (
datelayout string = "2006-01-02 15:04:05"
)
View tcpgobclient.go
package main
// use this with tcpgobserver.go
import (
"encoding/gob"
"fmt"
"log"
"net"
)
View tcpgobserver.go
package main
// use this with tcpgobclient.go
import (
"encoding/gob"
"fmt"
"net"
)