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
FROM daocloud.io/library/ubuntu:wily-20160706 | |
MAINTAINER songtianyi <[email protected]> | |
RUN echo "deb http://mirrors.aliyun.com/ubuntu xenial main restricted universe multiverse\n" > /etc/apt/sources.list | |
# Pick up some dependencies | |
RUN apt-get update && apt-get install -y --no-install-recommends \ | |
g++ \ | |
clang \ |
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
mkdir $GOPATH/src/golang.org/x | |
cd $GOPATH/src/golang.org/x | |
git clone https://github.com/golang/net.git |
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
START WITH FRESH DECK | |
GET RANDOM SEED | |
FOR CT = 1, WHILE CT <= 52, DO | |
X = RANDOM NUMBER BETWEEN CT AND 52 INCLUSIVE | |
SWAP DECK[CT] WITH DECK[X] |
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
public class GroovyTest { | |
// sum method | |
def static sum(n, closure) { | |
for(int i = 2; i <= n; i += 2) { | |
closure(i) | |
} | |
// return 2 | |
2 | |
} |
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" | |
"reflect" | |
) | |
type Data struct { | |
foo string | |
bar 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 ( | |
"fmt" | |
"os" | |
"strconv" | |
"github.com/songtianyi/laosj/spider" | |
"github.com/urfave/cli" | |
) |
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" | |
"strings" | |
"time" | |
"github.com/ziutek/telnet" | |
) |
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 | |
type AnyOther struct{} | |
type Module interface { | |
Classify(*AnyOther) | |
} | |
type SomeModule struct { | |
Param 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 ( | |
"bufio" | |
"fmt" | |
"os" | |
"unicode" | |
"unicode/utf8" | |
) |