Skip to content

Instantly share code, notes, and snippets.

View yookoala's full-sized avatar

Koala Yeung yookoala

  • Pixel Action Studio
  • Hong Kong
  • 22:59 (UTC +08:00)
View GitHub Profile
View main.go
func merge(cs ...<-chan int) <-chan int {
out := make(chan int)
var cases []reflect.SelectCase
for _, c := range chans {
cases = append(cases, reflect.SelectCase{
Dir: reflect.SelectRecv,
Chan: reflect.ValueOf(c),
yookoala / example.php
Last active June 16, 2019 15:25 — forked from hklcf/Screenshot via Google PageSpeed API
Screenshot via Google PageSpeed API
View example.php
include_once 'getGooglePageSpeedScreenshot.php';
echo getGooglePageSpeedScreenshot($_GET['url']);
// Output: <img src="..." border="1" style="width: 80px; height: 80px" />
echo getGooglePageSpeedScreenshot($_GET['url'], [
'class' => 'thumbnail',
'style' => ['width: 80px;', 'height: 80px;']