- Take a list of URLs from the
os.Stdin
. - For every URL in the list start a goroutines.
- Do not run more than
k=5
goroutines. - Do not run more than
len(URLs)
goroutines (e.g. ifk=1000
andlen(urls)=10
).
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 ( | |
"github.com/mailru/easyjson" | |
) | |
type FlatJSONResponse struct { | |
Tmpl string | |
Vars easyjson.RawMessage | |
} |
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
// A program to rename reports from github.com/LK4D4/report | |
// See https://github.com/LK4D4/report/issues/2 | |
package main | |
import ( | |
"fmt" | |
"io/ioutil" | |
"os" | |
"path/filepath" |
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 Popup from 'popup'; | |
class Tooltip extends Component { | |
render() { | |
return ( | |
<Popup visible={this.props.visible} anchor={this.props.anchor} onRequestHide={this.onPopupRequestHide}> | |
<div onMouseEnter={this.onPopupMouseEnter} onMouseLeave={this.onPopupMouseLeave}> | |
{this.props.children} | |
</div> | |
</Popup> |
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
: ${DOCKER:=docker} | |
# fix git detached clone | |
git repack -a -d && rm -f .git/objects/info/alternates | |
# update the changelog inside a container | |
$DOCKER run --rm -v $PWD:/tmp/build -w /tmp/build \ | |
-e "EDITOR=/bin/true" \ | |
-e "DEBEMAIL=$DEBEMAIL" -e "DEBFULLNAME=$DEBFULLNAME" -e "DEB_VENDOR=debian" \ | |
registry.ape.yandex.net/vertis/buildbox-buildpkg:1.trusty \ |
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
docker start ... | |
docker/daemon/container_linux.go | |
container.Start() | |
container.initializeNetworking() | |
container.AllocateNetwork() | |
n := container.daemon.netController.NetworkByName() | |
ep := n.CreateEndpoint() | |
d := n.driver |
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
# docker version | |
docker version | |
Client: | |
Version: 1.10.2 | |
API version: 1.22 | |
Go version: go1.5.3 | |
Git commit: c3959b1 | |
Built: Mon Feb 22 21:37:01 2016 | |
OS/Arch: linux/amd64 |