- 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 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 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 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 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 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 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 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) |
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
# At this point I'm just inching towards sending a request to the upstream. | |
# So first goal is to make http1client_connect() to succeed... | |
# Instead I get this. | |
# I wonder why chunked.on_setup_ostream is being called twice, thus (I believe | |
# is causing the assert to fail) | |
# Note: upstream server is NOT running, so I'm expecting a failure to connect. | |
shoebill% ./h2o | |
Creating filter of size 40 | |
inserted new filter at 1 |
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
ADDR=$(docker inspect $CONTAINER_NAME | perl -ne '/"IPAddress": "([^"]+)"/ && print "$1\n"') | |
echo "host-record=$CONTAINER_NAME,$ADDR" > /etc/dnsmasq.d/docker-$CONTAINER_NAME | |
service dnsmasq restart |