I hereby claim:
- I am thegeekpirate on github.
- I am dozn (https://keybase.io/dozn) on keybase.
- I have a public key ASCndaED49r_hfM6uz81gP1e6ID0J9W3Gv2hKe_OWOpgago
To claim this, I am signing this object:
// BAPCSalesLiveFeed will show a constant stream of live updates from the /r/bapcsalescanada subreddit. | |
// It was hacked together as quickly as possible in preparation for Black Friday. | |
// Note that this leaks memory _very slowly_ due to us constantly adding IDs to the postCache. | |
// This isn't a big deal since the amount of data stored is miniscule, but worth noting if you're | |
// going to be running it non-stop for a couple of years on a memory-constrained system for whatever reason. | |
package main | |
import ( | |
"encoding/json" |
#!/bin/bash | |
#Uses https://github.com/GiedriusS/TwitchNotifier along with zenity | |
#to provide a nice list of followed streams which are currently online, | |
#then plays the selected stream using youtube-dl and mpv. | |
if [ -z "$2" ]; then | |
streamsOnline=$(twitchnotifier -c thegeekpirate -n | sort) | |
numCharsLongestChan=$(echo "$streamsOnline" | cut -d "^" -f 1 | wc -L) | |
numCharsLongestGame=$(echo "$streamsOnline" | cut -d "^" -f 2 | wc -L) | |
width=$((117+(numCharsLongestChan+numCharsLongestGame)*5)) |
// SendMessage is a convenience method to send messages with | |
func SendMessage(s *discordgo.Session, m *discordgo.MessageCreate, message string) { | |
_, err := s.ChannelMessageSend(m.ChannelID, message) | |
if err != nil { | |
return | |
} | |
} | |
// SendDM will attempt to send a direct message to the user | |
func SendDM(s *discordgo.Session, m *discordgo.MessageCreate, message string) { |
040b7d78de5b002ba128eb8de8f2b03b2f3657885d0fb1850cee9ae7163841ccf4f84262902370a55ffd9c95e9b09751af48d3c1c7603d5fe20a703a19510c5ef9;bradennapier |
package main | |
import ( | |
"encoding/xml" | |
"errors" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"net/http" | |
"os" |
I hereby claim:
To claim this, I am signing this object:
package browser | |
import ( | |
"fmt" | |
"os/exec" | |
"runtime" | |
) | |
// TODO: aix, android, hurd, illumos, ?js?, nacl, zos | |
// TODO: Test plan9, solaris (can we just use "sdtwebclient" instead?) |
#!/bin/sh | |
#From https://golang.org/doc/install/source#environment | |
platforms=(aix android darwin dragonfly freebsd illumos js linux netbsd openbsd plan9 solaris windows) | |
arches=(386 amd64 arm arm64 mips mipsle mips64 mips64le ppc64 ppc64le s390x wasm) | |
#.go file to build | |
test "$1" && target="$1" | |
if ! test "$target"; then |
#!/bin/sh | |
#From https://golang.org/doc/install/source#environment | |
platforms=(aix android darwin dragonfly freebsd illumos js linux netbsd openbsd plan9 solaris windows) | |
arches=(386 amd64 arm arm64 mips mipsle mips64 mips64le ppc64 ppc64le s390x wasm) | |
#.go file to build | |
test "$1" && target="$1" | |
if ! test "$target"; then |