This file contains hidden or 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 join | |
import ( | |
"fmt" | |
"strings" | |
"testing" | |
) | |
var ( | |
testData = []string{"a", "b", "c", "d", "e"} |
This file contains hidden or 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
import Network.Socket | |
import System.IO | |
import Control.Monad | |
import Control.Monad.Fix (fix) | |
import Control.Concurrent | |
import Debug.Trace | |
import System.Log.Logger | |
import System.Log.Handler.Syslog | |
import System.Log.Handler.Simple | |
import Data.Conduit |
This file contains hidden or 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 ( | |
"expvar" | |
"io" | |
"io/ioutil" | |
"log" | |
"net/http" | |
_ "net/http/pprof" | |
"os" |
This file contains hidden or 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 cache | |
import ( | |
"errors" | |
"math" | |
"sync" | |
"time" | |
) | |
type ByteCacher interface { |
This file contains hidden or 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 | |
// This script will cause the syslog client object to deadlock on its mutex during writeAndRetry | |
import ( | |
"errors" | |
"flag" | |
"fmt" | |
"log" | |
"net" |
This file contains hidden or 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" | |
"log" | |
"os" | |
"os/signal" | |
"sync" | |
"syscall" |
This file contains hidden or 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" | |
"io" | |
"log" | |
"os" | |
"os/signal" | |
"syscall" | |
) |
This file contains hidden or 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
#!/bin/bash | |
# | |
# INSTALL: curl https://gist.githubusercontent.com/dtjm/8562728/raw/5ca0f60621a25365e2e61926dc05ef3f7df67b38/goenv > ~/bin/goenv && chmod +x ~/bin/goenv | |
# USAGE: | |
# goenv | |
# goenv path/to/GOPATH | |
# | |
if [[ -z $1 ]]; then | |
export GOPATH=$PWD |
This file contains hidden or 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
<html> | |
<head> | |
<meta charset='utf-8'> | |
<title>EHLO SendGrid</title> | |
<style type="text/css"> | |
body { | |
background-color: #eee; | |
color: #222; | |
font-family: "Courier", monospace; | |
font-size: 16px; |
This file contains hidden or 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" | |
"github.com/bradfitz/go-smtpd/smtpd" | |
"log" | |
"time" | |
) | |
var addr = flag.String("addr", ":25", "listen address") |