- InputReader - Reads from os.Stdin or file
- RawListBuffer - Buffers output from InputReader
- QueryFilter - Receive stream of Line objects, and filters according to user query
- FilteredLineBuffer - Buffers output from QueryFilter
- PagedLineBuffer - Type of FilteredLineBuffer, but creates a "paged" view of the filtered buffer, so it can be displayed to the terminal
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 ( | |
"fmt" | |
"math/rand" | |
"time" | |
"golang.org/x/net/context" | |
) |
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 app | |
import ( | |
"net/http" | |
"strings" | |
"github.com/gorilla/mux" | |
"golang.org/x/context" | |
) |
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
shoebill% perl -MXML::LibXML -E 'say XML::LibXML->new()->parse_string("<foo>bar</foo>")->findvalue("baz")' | |
shoebill% perl -MXML::LibXML -E 'say XML::LibXML->new()->parse_string("<foo>bar</foo>")->findvalue("foo")' | |
bar |
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 ( | |
"log" | |
"math/rand" | |
"time" | |
) | |
type Promise struct { | |
done bool |
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 peco | |
import ( | |
"log" | |
"os" | |
) | |
type traceLogger interface { | |
Printf(string, ...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
wg := &sync.WaitGroup{} | |
ch := make(chan struct{}) | |
for i := 0; i < 100; i++ { | |
wg.Add(1) | |
go func(ch chan struct{}) { | |
defer wg.Done() | |
for _ = range ch { | |
r, err := c.SayHello(context.Background(), &pb.HelloRequest{Name: name}) | |
if err != nil { | |
log.Fatalf("could not greet: %v", err) |
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
#!perl | |
use strict; | |
print <<EOM; | |
Hello, World! | |
EOM | |
exit 0; |
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
print "Hello, $ARGV[0]\n" |
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
perl -MData::Dumper -MConfig::General -E ‘$Data::Dumper::Indent = $Data::Dumper::Terse = $Data::Dumper::Sortkeys = 1; say Dumper(Config::General->new(“filename”)->config) |