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 ( | |
"flag" | |
"fmt" | |
steam "github.com/kidoman/go-steam" | |
"sort" | |
) | |
var addresses = []string{ |
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 ( | |
"crypto/tls" | |
"fmt" | |
"log" | |
"net" | |
"net/mail" | |
"net/smtp" | |
) |
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 ( | |
"crypto/cipher" | |
"fmt" | |
"go.crypto/blowfish" | |
) | |
func blowfishChecksizeAndPad(pt []byte) []byte { | |
// calculate modulus of plaintext to blowfish's cipher block size |
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
// http://japan-timebot-simple.appspot.com | |
package japantime | |
import ( | |
"fmt" | |
"net/http" | |
"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 ( | |
"fmt" | |
"github.com/nlopes/slack" | |
) | |
func main() { | |
// create new slack object & connect | |
api := slack.New("TOKEN_REDACTED") | |
api.SetDebug(true) | |
rtm := api.NewRTM() |
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
// | |
// EDIT: this code is now old | |
// i have recently (april 2016) updated it to use the new golang.org/x/oauth2 lib | |
// you can get the new analytics dumper at the below url: | |
// https://gist.github.com/rickt/d839564155cac15d59b6027668d8cb64 | |
// | |
package main | |
import ( |
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 ( | |
"encoding/json" | |
"fmt" | |
"log" | |
"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 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" |
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 | |
// https://rickt.org/2019/01/08/playing-with-g-suite-mdm-mobile-device-data-using-go/ | |
import ( | |
"context" | |
"errors" | |
"flag" | |
"fmt" | |
"github.com/dustin/go-humanize" |
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
# | |
# 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 |